Azure B2C Override Url after registration

Minh Tra 1 Reputation point
2022-02-15T16:00:27.75+00:00

Hi,

I'm using custom policy in Azure B2C. I try to redirect to the profile edit page after user register successfully.
Otherwise, I will redirect user to home page when user login successfully. I saw there's solution on StackOverflow but i cannot how to implement it

azure-b2c-redirect-uri-override-after-registration

Can anyone show me how to use UsePolicyInRedirectUri. I'm searching but there's no document show how to use it with True value.

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,840 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. James Hamil 24,136 Reputation points Microsoft Employee
    2022-02-15T22:20:44.49+00:00

    Hi @Minh Tra , in the SO thread, this link details how you can do this. In the HTTP request you would have to add the UsePolicyInRedirectUri attribute like this:

    GET https://login.contoso.com/oauth/v2/authorization?  
    client_id=12345  
    &response_type=code  
    &response_mode=query  
    &redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob  
    &scope=profile%20offline_access  
    &UsePolicyInRedirectUri = [LINK HERE]  
    &redirect_uri=https%3a%2f%2fabrikam.b2clogin.com%2fabrikam.onmicrosoft.com%2foauth2%2fauthresp  
    &state=...  
    

    Please let me know if this helps or if you have any questions.

    Best,
    James


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.