Generating an access token from an ID token - Custom policy

roshin.thomas 1 Reputation point
2023-01-09T13:40:15.307+00:00

I am using a id_token to pass information to AD B2C to bootstrap a user-journey from a link (similar to email sign in ) .

The url-builder creates a link

https://tenant.b2clogin.com/tenant.onmicrosoft.com/oauth2/v2.0/authorize?p=B2C_1A_SIGNIN_WITH_EMAIL&client_id=9----f8a-67890&redirect_uri=https://myapp.com/&nonce=9e4d18.....8302445a8069a&scope=openid&response_type=id_token&id_token_hint=eyJhb......  

I have the policy B2C_1A_SIGNIN_WITH_EMAIL that would read the user info from the email and issue a token .

I am expecting the user to be able to signin to the application with the token generated from the policy. But currently it reads the user, creates the id_token but since no token is generated application goes to login prompt.

The policy is below :

Thanks

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,639 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,459 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Stephen Ebichondo 0 Reputation points Microsoft Employee
    2023-03-29T22:45:05.1566667+00:00

    Hi @roshin.thomas you could follow the steps as detailed here.

    0 comments No comments