question

StefanK-4914 avatar image
0 Votes"
StefanK-4914 asked amanpreetsingh-msft answered

Is it possible to have an alternative login id in azure b2c?

Hi,

we are planning to use azure ad b2c to authenticate our customers.

At the moment our customers can either use their email + password OR their customer number + password to login to our apps.

Is this possible in azure ad b2c?

regards Stefan

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.

artmasa avatar image
0 Votes"
artmasa answered

It's just a matter of configuring both values as identities for the customer. One would be the email address identity and the other the username identity.

Are you accepting a different username other than email address and customer number at this moment?

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.

KrumbckStefan-4508 avatar image
0 Votes"
KrumbckStefan-4508 answered

Hi,

thanks for the responce.

Maybe I didn't understand you correct.

We don't have two identities. It should be the same customer but the customer can either enter his customer number OR email adress to login. (the password and other attributes stay the same).

regards
Stefan

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.

amanpreetsingh-msft avatar image
0 Votes"
amanpreetsingh-msft answered

@KrumbckStefan-4508 Yes, this can be done by using custom policy in B2C. Please refer to this sample: https://github.com/azure-ad-b2c/samples/tree/master/policies/username-or-email.

With built-in user flows, you can either use username or email address for sign-in but not both.


Please "Accept as answer" wherever the information provided helps you to help others in the community.

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.