question

AbhayChandramouli-2076 avatar image
0 Votes"
AbhayChandramouli-2076 asked JamesHamil-MSFT answered

Azure AD B2C | Can I have a login flow where If a user tries to login who doesnt already exist in Azure, then Azure AD B2C creates the user ?

Hi
I want to have a sign in flow, where if a user enters a email and password, and if the user doesnt exist, Azure should not show the error, but call an api using api-connector if the api response "yes" add the user to azure ad and log the user in.

@amanpreetsingh-msft if you can help with this

Thank You !

azure-ad-b2c
· 1
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 can you please help me with this ?

0 Votes 0 ·

1 Answer

JamesHamil-MSFT avatar image
0 Votes"
JamesHamil-MSFT answered

Hi @AbhayChandramouli-2076 , I recommend in this case to redirect to a sign-up page instead of automatically registering the user. There are a few reasons for this. What if the user already exists, but the username is input wrong? Or they use the wrong email? It's best to tell the user why the login is failing, especially if they've already visited the site. This could lead to duplicate users or misspelled email addresses, etc.

Please let me know if you have any questions.

Best,
James

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.