Hi
Thanks for the response
Hope this log can help. This is the only log I am finding in keycloak.log
WARN [org.keycloak.events] (executor-thread-66) type=USER_INFO_REQUEST_ERROR, realmId=d4310d0d-d58b-40de-a6c5-f5b211291b73, clientId=null, userId=null, ipAddress=121.241.202.136, error=invalid_token, auth_method=validate_access_token
The application we are using is built on reactJS. we are using
oidc-client-ts library to connect to Keycloak. what I noticed is that it is able to get the access token by establishing a connection but when userinfo is called, getting 401
I agree that grant_type client_credentials will not work for userinfo if its not an actual user. But if I am passing a username in the token POST method which is created for the realm, will it not work still?
curl --location 'https://{{keycloak url}}/realms/{{realm name}}/protocol/openid-connect/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'username={{user created in the realm}}' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id=<KEYCLOAK_CLIENT_ID>' \
--data-urlencode 'client_secret=<KEYCLOAK_CLIENT_SECRET>' \
--data-urlencode 'scope=openid'
Regards,