0

This is the Azure B2C User Flow’s Application claims, where I can tick the Email Addresses and save it. UserFlow Application Claims

How can I do this in custom policy? I am trying to add Multi-Tenant login to AAD B2C via custom policies and I need to select this ‘Email Addresses’ in the Application Claims from User Flow. How can I select or activate this same ‘Email Addresses’ in custom policy XML files?

So far I tried adding -->> OutputClaim ClaimTypeReferenceId="signInNames.emailAddress" <<-- to the technical profiles, but still no luck.

BCdeve
  • 3
  • 3

1 Answers1

0

The claim you want is "preferred_username".

Try to add <OutputClaim ClaimTypeReferenceId="email" PartnerClaimType="preferred_username" />.

Allen Wu
  • 15,529
  • 1
  • 9
  • 20
  • If my answer is helpful for you, you can accept it as answer( click on the check mark beside the answer to toggle it from greyed out to filled in.). See https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work. This can be beneficial to other community members. Thank you. – Allen Wu Mar 15 '21 at 01:23
  • The error went away, but I've gotten another error from my web app: Response status code does not indicate success: 400 (Bad Request) Also I tested a run on a web app using "https://jwt.ms/, it also has this error: AADB2C90037: An error occurred while processing the request. Please contact administrator of the site you are trying to access. Anything I need to double check on? do I need to add preferred username output claim into SignUpOrSignin.xml? – BCdeve Mar 15 '21 at 08:01
  • @BCdeve I'm not sure. The information is too little and it's related to a new issue. It's recommended to add a new post with details. If my answer is helpful to the original issue in this post, you can mark it as accepted. If you are happy to mark correct answer , others are more happy to help you:) – Allen Wu Mar 16 '21 at 02:39
  • Thanks Allen, do you know which OutputClaim should I implement to the file for Facebook, Twitter and Google? Adding – BCdeve Mar 16 '21 at 06:01
  • @BCdeve Sorry I'm not familiar with the social idps you mentioned. It's recommended to add a new post so that more people can see your question. – Allen Wu Mar 16 '21 at 06:18