Hi,
Currently, our internal users authenticate through custom login logic (legacy implementation), where we capture the complete TokenResponse locally and use it for downstream API calls and customer-data access through token impersonation(oauth-token-exchange-impersonation).
As part of our migration to Pega Cloud, we are moving internal users to the standard OIDC authentication flow supported by Pega.
Our new authentication flow works as follows:
-
Pega initiates the Authorization Code Flow with PKCE against our Identity Provider .
-
Pega securely stores the complete token response in encrypted format in pr_data_token and exposes the ID token on the clipboard.
-
For downstream API calls, Pega internally retrieves the encrypted access token generated during authentication and passes it to the APIs. This process is platform-managed, and we do not have access to the underlying access token.
Our challenge:
For certain use cases, internal users need to retrieve customer-specific information (Loans, Cards, etc.). We currently achieve this using the OAuth Token Exchange / Impersonation flow (oauth-token-exchange-impersonation), where we exchange the internal user’s access token with our IDP to obtain an impersonated token.
With Pega Cloud OIDC authentication, we cannot access the underlying encrypted access token to initiate this token exchange.
I also came across a similar discussion in the Pega Community, but it doesn’t appear to have a conclusive solution.
Question:
Is there a standard or recommended approach in Pega Cloud to implement the OAuth Token Exchange (Impersonation) flow using the access token from SSO session.
Any guidance would be appreciated..