keycloak impersonation 19.0.1 version

64 views
Skip to first unread message

R Srilekha

unread,
May 29, 2023, 4:46:42 AM5/29/23
to Keycloak User
HI,
Trying to enable impersonation feature on Keycloak 19.0.1 to generate access token based on client id, secret key, user id but getting 
"403 exception Client not allowed to exchange"

Please find the below curl command and do needful
/realms/idap/protocol/openid-connect/token

curl -X POST \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=urn:ietf:params:oauth:grant-type:token-exchange" \
  -d "client_id=idap" \
  -d "client_secret=xyx" \
  -d "requested_subject=f:3fb39b07-c0ca-402a-ba8b-90e5bb893f13:1300" \
  -d "subject_token=<clientToken>" \
  -d "requested_token_type=urn:ietf:params:oauth:token-type:access_token" \
  <keycloakUrl>/realms/idap/protocol/openid-connect/token

Regards,
Srilekha
91 9381773858

Reply all
Reply to author
Forward
0 new messages