question

RoshanMaddumage-8643 avatar image
0 Votes"
RoshanMaddumage-8643 asked AadityaShete-4921 commented

Set up phone sign-up and sign-in with custom policies in Azure AD B2C

I am currently working on azure ad b2c phone sign-in and sign-up. I have followed the guide and completed all the steps and the flow is working well. But I want to remove that display name, given name, and surname fields and additional recovery email collect screen from the sign-up. How can I achieve this? Is it possible to do it?


azure-ad-b2c
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

amanpreetsingh-msft avatar image
1 Vote"
amanpreetsingh-msft answered AadityaShete-4921 commented

Hi anonymous user

Yes, it is possible to do it but would require changes to multiple technical profiles and updating User Journey to remove email collect screen and has to be done carefully as it may result in unexpected behavior.

My suggestion would be to go with This Sample as it meets your requirement. In order to signup or signin, all you need to provide is the Phone Number and no other attributes are needed to be provided.

Steps:

  1. Download the starter pack and use the "SocialAndLocalAccountsWithMfa" template.

  2. Follow the steps mentioned here: Add application IDs to the custom policy and upload the policy files.

  3. Update the base policy tag in the TrustFrameworkLocalization.xml file provided in the sample to point towards your TrustFrameworkExtension file and upload the file.

  4. Upload the phone-signup-signin.xml file in B2C IEF section from the sample after updating the file with your tenant name.


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

· 8
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, @amanpreetsingh-msft Thank you very much for your quick response. I will follow your steps and will let you know. Thanks

0 Votes 0 ·

Hi, @amanpreetsingh-msft I completed Steps 1, 2, and 3 but when I am going to upload phone-signup-signin.xml getting this error.

please use page contract in content definitions when enabling javascript


I have read this also. any idea to resolve this



0 Votes 0 ·

anonymous user ·
- If you are not using JavaScript, you can remove ScriptExecution tag from the phone-signup-signin.xml file and you should be able to upload the file.
- If you are using JavaScript, make sure you replace old DataUri Value with new DataUri Value in your Base file as mentioned here: https://docs.microsoft.com/en-us/azure/active-directory-b2c/contentdefinitions#migrating-to-page-layout

1 Vote 1 ·

Thank you very much for your support. It's worked after removing the ScriptExecution tag.
@amanpreetsingh-msft

0 Votes 0 ·

@amanpreetsingh-msft One more thing need to know, how to remove country code selection and use phone number input only with country code like +4721542635 etc. is it possible?

0 Votes 0 ·

anonymous user · I won't suggest doing that as in that case phone number would needed to be parsed to figure out country code and use that as the value of country code claim. Which is a lot more complicated process than what it appears to be.

0 Votes 0 ·

Hi @amanpreetsingh-msft ,
Is it possible to have just a single screen where the user selects the country code and enters phonenumber instead of having two screens?

0 Votes 0 ·

Hi @amanpreetsingh-msft One more thing I want to know that, How can I disable auto-trigger/auto-submit user input for verification Code?. Sometimes users confused about that auto submit process.

0 Votes 0 ·