<div dir="ltr"><div>Hello group,<br></div><div><br></div><div>I have the following scenario:</div><div>1) A SSO authenticated User1 calls Service1 (confidential client).</div><div>2) Service1 extracts access token.</div><div>3) Service1 performs a remote call to Service2 passing the access token along.</div><div>4) Service2 needs to do something in the name of User1 in Keycloak (e.g. set a user attribute, or create a new users)</div><div>5) Service2 uses org.keycloak.admin.client.Keycloak to communicate with Keycloak<br></div><div>to perform the requested operation.</div><div><br></div><div>I want to be able to propagate the access token in  </div><div>Service to service calls and use the &#39;org.keycloak.admin.client.Keycloak&#39; client</div><div>with the provided access token to perform an operation in Keycloak. </div><div><br></div><div>Currently &#39;org.keycloak.admin.client.Keycloak&#39; only supports client credentials and / or password,</div><div>which it uses to get an refresh token to renew a potentially timed out access token.</div><div><br></div><div>As a PoC I slightly adjusted the Keycloak client to allow for externally provided access tokens:</div><div><a href="https://gist.github.com/thomasdarimont/d82c4478df997556a9d16afb79787459">https://gist.github.com/thomasdarimont/d82c4478df997556a9d16afb79787459</a><br></div><div><br></div><div>I think the Keycloak Client should also support &quot;call once&quot; scenarios with a provided access token out of the box.</div><div><br></div><div>Shall I create a JIRA for this?</div><div><br></div><div>Cheers,</div><div>Thomas   </div></div>