UserInfo endpoint returns 401 on GET request, but works fine with POST #29060
-
The setupKeycloak v21.1.2 running via k8s operator. openid client scope is created and added to client. The prerequisitesGetting the token first:
Works great, getting
Getting the response, all good by now.
The problem
Returns 401 and I can see this in the Keycloak logs: However, if i try to to do POST instead, it works fine, giving me userinfo back Response: 200 and user info payload. Any ideas what is wrong with the setup? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Actually given that you are getting a |
Beta Was this translation helpful? Give feedback.
Actually given that you are getting a
401
and not403
I somewhat suspect that when you are making theGET
request you aren't actually sending theAuthorization
header with the token. Can you elaborate or show the codes how you are actually making the call? You might have set the header in the wrong variable for instance.