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.