0

When i read the documentation from microsoft for Azure B2C, it mentions that we can collect user attributes during the sing up flow.

I have a requirement where i need to get a input from the user during the sign in flow. Other than the username and password entered during the sign in, i need the user to enter another field.

Is there an option to do the above in the sign in flow?

2 Answers2

0

You need to use a custom policy.

It will allow you to add any extra pages and/or logic to any journey.

Samples: https://github.com/azure-ad-b2c/samples

Jas Suri - MSFT
  • 10,605
  • 2
  • 10
  • 20
  • I could not find an example on how to create a custom policy to accept custom input during sign in. Can you please share a link to an example? – Zehan Jurangpathy Jul 13 '21 at 18:03
  • This [sample](https://github.com/azure-ad-b2c/samples/tree/master/policies/split-email-verification-and-signup) shows how to present more pages to the user by using the self asserted technical profile. – Jas Suri - MSFT Jul 13 '21 at 19:50
0

Another way of collecting user input (eg. an additional field in the sign-up form) during sign-up without using custom policies is as follows:

  • In the Azure B2C set up an additional User Attribute of the type String
  • In the specific sign-in flow require this User Attribute to be collected.
  • If needed, you can customize the wording and default values used in the form by supplying a language override in the specific flow.
fox918
  • 179
  • 3
  • 9
  • When i try to create a userflow, it only allows to add user attributes to the signup screen. It specifically mentions that to select the user attributes that you need during the sign up. Do you have any reference on how to add it to sign in? – Zehan Jurangpathy Jul 13 '21 at 18:01
  • you are correct, I use it to get additional fields during sign up. Probably the only answer during sign-in is to use the Azure custom policies. – fox918 Jul 15 '21 at 10:04