Token refresh fails with the message "Session doesn't have required client"

Solution Verified - Updated -

Issue

  • Token refresh fails with the message "Session doesn't have required client"
  • The following message is logged in server.log.
WARN  [org.keycloak.events] (default task-27) type=REFRESH_TOKEN_ERROR, realmId=master, clientId=test, userId=e6b16ba7-d845-4a74-b3cc-330584db2d5e, ipAddress=127.0.0.1, error=invalid_token, grant_type=refresh_token, refresh_token_type=Refresh, refresh_token_id=932d4783-4ab5-427c-a284-c1d2f943dfd5, client_auth_method=client-secret
  • The response message is {"error":"invalid_grant","error_description":"Session doesn't have required client"}.
  • We are using Offline sessions to persist user session for long period of time. At times user receive below error message, after which user has to re-authenticate into RH-SSO.
org.keycloak.OAuthErrorException: Session doesn't have required client 

Environment

  • Red Hat Single Sign-On
    • 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content