OIDC Authentication - Model Operator Identification Based on ID Token Claims & Access Token Availability
Hi Team,
We are currently migrating our application from Pega On-Premises to Pega Cloud and replacing our existing LDAP authentication with OpenID Connect (OIDC) authentication.
Requirement
Our Identity Provider (IdP) returns the user’s AD Groups as part of the ID Token claims.
Our requirements are:
-
Model Operator Identification
-
During operator provisioning, identify the appropriate Model Operator based on the
ad_groupsclaim received in the ID Token. -
Create the operator profile using the identified Model Operator.
-
For existing users, always assign/update the appropriate Access Group during login in case the user’s AD group membership has changed.
-
-
Token Availability
- After successful authentication, the Access Token and Refresh Token received from the IdP should be available within the user session so they can be used for downstream REST API calls.
Current Status
OIDC authentication is working successfully.
The ID Token is validated successfully, and the debug logs confirm that all expected claims are received.
Example debug logs:
StateParam Validation is successful
- Fetching access token using authCode received
- Successfully fetched access token and ID token using authCode
- Validating ID token received from access token endpoint
- JWT is Signed
- Truststore picked is MyOrg-jwt-signing-test-2025-08-27
- Successfully validated ID token with standard claims
UserClaims received:
{
sub=user1,
ad_groups=[
KB00-MyAPPSuperuserVer,
KB00-MyAPPSuperuser,
KB00-MyAPPSuperuserTest
],
...
}
So, the IdP is returning the expected claims, and Pega is successfully validating the ID Token.
Challenges
1. Accessing OIDC Claims During Operator Provisioning
Our goal is to determine the appropriate Model Operator based on the ad_groups claim.
We tried the following:
-
Mapped the
ad_groupsclaim to a temporary page using Claim Mapping. -
Attempted to reference that page from the Operator Provisioning Data Transform.
However, the mapped page is not available during provisioning.
We also referred to the Pega documentation, which mentions that D_pzSSOAttributes can be used to access SSO claims.
However:
-
D_pzSSOAttributesis not available during operator provisioning. -
We are unable to access
pyAttrListor any of the claims from that data page.
Question 1
Is there any supported approach to access OIDC claims (especially ad_groups) during “Enable operator provisioning using model operator”?
More specifically:
-
At what stage are the OIDC claims available?
-
Is there a supported API, data page, clipboard page, or extension point that can be used to read these claims before the Model Operator is selected?
-
Has anyone implemented dynamic Model Operator selection based on OIDC claims such as AD Groups?
2. Access Token and Refresh Token Availability
The debug logs clearly indicate that Pega successfully retrieves the Access Token.
However, we are unable to locate it:
-
Not on the Clipboard.
-
Not in any token-related instances.
-
Not in any obvious requestor/session pages.
Question 2
Where does Pega store the Access Token and Refresh Token after successful OIDC authentication?
Ideally, we would like to access these tokens during PostAuthentication (or another supported extension point) so they can be used for downstream API calls on behalf of the authenticated user.
Is there a supported mechanism or API to retrieve these tokens?
If we are missing any configuration or following an incorrect approach, please let us know.
We have attached our OIDC configuration screenshots document for reference.
Any guidance or implementation experience would be greatly appreciated.
Thank you!
Pega_OIDC_Config.docx (302.1 KB)