Hi @David De Jaeger , yes you can do this. This is the general overview:
- If you haven't already, you need to create custom attributes in your tenant. These attributes can be used to store additional information about the user. Follow the guide here: Define custom attributes.
- You can specify which claims should be included in the access token by configuring optional claims in the app registration: Add or remove optional claims.
- If you require more advanced customization, you can create custom policies: Custom policies in Azure AD B2C.
- To call an external system to retrieve additional claims and add them to the token, you can use the API Connector feature: Custom claims provider.
- Verify that the application manifest is updated to include the optional claims. You can specify the optional claims in the
manifest
file of the app registration in Entra ID
For example:
{
"id": "your-app-id",
"acceptMappedClaims": null,
"accessTokenAcceptedVersion": 2,
"knownClientApplications": [],
"optionalClaims": {
"idToken": [],
"accessToken": [
{
"name": "extension_yourCustomAttribute",
"source": null,
"essential": false,
"additionalProperties": []
}
],
"saml2Token": []
},
"groupMembershipClaims": null,
"signInAudience": "AzureADMyOrg",
"appRoles": [],
"oauth2AllowImplicitFlow": true,
"oauth2AllowUrlPathMatching": false,
"oauth2Permissions": [],
"oauth2RequirePostResponse": false,
"allowPublicClient": null,
"requiredResourceAccess": [],
"preAuthorizedApplications": []
}
This should work for you, but without seeing your setup it's hard for me to pinpoint the exact problem point. If this still doesn't work please let me know.
Please let me know if you have any questions and I can help you further.
If this answer helps you please mark "Accept Answer" so other users can reference it.
Thank you,
James