B2C technical profile for username and password

Vikas Tiwari 771 Reputation points
2020-08-11T05:09:25.723+00:00

Hi,

I have created user through graph service client and setup following properties:

SignInType = "userName",
 Issuer = tenantId,
 IssuerAssignedId = siteUser.userId

I am looking for example documentation to set technical profile as username and password instead of email address. So that when user will sign-in using credentials I can call rest api which will validate through legacy identity provider and give result back to B2C app (trying to achieve seamless user migration).

Thanks.

Microsoft Security | Microsoft Entra | Microsoft Entra External ID
Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

Answer accepted by question author
  1. AmanpreetSingh-MSFT 56,936 Reputation points Moderator
    2020-08-11T06:04:53.4+00:00

    Hello @Vikas Tiwari

    For scenarios where you would like users to sign up and sign in with Usernames rather than Emails, you can use the sample below:

    https://github.com/azure-ad-b2c/samples/tree/master/policies/username-signup-or-signin/policy

    You need to chain the Username_TrustFrameworkExtensions.xml file with your existing TrustFrameworkBase and TrustFrameworkExtensions file, which will look like:

    SignupOrSignIn > Username_TrustFrameworkExtensions > TrustFrameworkExtensions > TrustFrameworkBase.

    For this purpose, base policy tag in Username_TrustFrameworkExtensions.xml file should be:

    <BasePolicy>  
        <TenantId>yourtenant.onmicrosoft.com</TenantId>  
        <PolicyId>B2C_1A_TrustFrameworkExtensions</PolicyId>  
    </BasePolicy>  
    

    And in the SignupOrSignIn.xml file, it should be:

    <BasePolicy>  
        <TenantId>yourtenant.onmicrosoft.com</TenantId>  
        <PolicyId>B2C_1A_Username_TrustFrameworkExtensions</PolicyId>  
    </BasePolicy>  
    

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


0 additional answers

Sort by: Most helpful

Your answer

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