How to get id token in ADB2C custom policy

Srivalli 36 Reputation points
2019-12-06T10:58:26.647+00:00

Hi All,

We are trying to capture the id token that gets generated while a custom policy is executed. Is there any way we can assign it to a claim and use it in the custom policy. we could infer from the application insights that id token is present in the ValidationResponse of "login-NonInteractive" technical profile.

Logs:

""ValidationResponse"": {
""ContentType"": ""Json"",
""Created"": ""2019-12-06T07:29:26.216Z"",
""Key"": ""ValidationResponse"",
""Persistent"": true,
""Value"": ""{\""token_type\"":\""Bearer\"",\""scope\"":\""user_impersonation\"",\""expires_in\"":\""3599\"",\""ext_expires_in\"":\""3599\"",\""expires_on\"":\""1575620966\"",\""not_before\"":\""1575617066\"",\""resource\"":\""57caffef-83ff-49af-ba39-4e539cb78494\"",\""access_token\"":\"""",\""refresh_token\"":\""*"",\""id_token\"":\""****.\""};1;login-NonInteractive;False""
},

Thank you for checking!

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,708 questions
0 comments No comments
{count} votes

Accepted answer
  1. AmanpreetSingh-MSFT 56,441 Reputation points
    2019-12-09T06:44:50.183+00:00

    @Srivalli
    Azure AD B2C currently supports passing only the access token of External IDPs. ID token issued by B2C can't be added as claim in the token.

    Below are the docs for passing the access token of External IDPs as claims using custom policy and built-in user flow:

    1. https://learn.microsoft.com/en-us/azure/active-directory-b2c/idp-pass-through-custom
    2. https://learn.microsoft.com/en-us/azure/active-directory-b2c/idp-pass-through-user-flow

    -----------------------------------------------------------------------------------------------------------

    Please "mark as answer" or "vote as helpful" wherever the information provided helps you to help others in the community.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful