Generating an access token from an ID token - Custom policy

roshin.thomas 6 Reputation points
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 Security | Microsoft Entra | Microsoft Entra External ID
Microsoft Security | Microsoft Entra | Microsoft Entra ID
{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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.