question

TeguaycoGutirrez-1153 avatar image
0 Votes"
TeguaycoGutirrez-1153 asked TeguaycoGutirrez-1153 commented

Azure B2C authentication using ASP.NET Core 1.1.7 and Microsoft Identity Provider

I have a web application using .NET Framework 4.7.2 + ASP.NET Core 1.1.7 and I want to implement on it user authentication using Microsoft Azure B2C.

The idea is to add from the Azure B2C portal what users can log in by exclusively adding their already-existing Microsoft Account, i.e. they should log in using the following form:

57193-screenshot-4.png

These users are meant to be internal users of the organization only and they must not sign-up themselves via any kind of sign-up form.

I have already created a policy for Signing In and configured Microsoft Account on it as an Identity Provider:

57138-screenshot-2.png

However, I constantly get the following error message when launching the app, where I expect me to be redirected to the Microsoft Account Login Page:

57212-screenshot-3.png

Can I achieve this goal (make users login via their Microsoft Account) given the current scenario (web app with .NET Framework 4.7.2 + ASP.NET Core 1.1.7)?

I'd like to try to avoid any framework update if possible as it is very likely to introduce important breaking changes in the app.

Possible hint: according to this Microsoft documentation, the most suitable configuration for this use case should be the following:

57213-b54c7c6f-c834-470f-aa7f-dadd91ceb319.png

which I can only set for an app being registered with the following second option (legacy), not with the first one:

57080-screenshot-1.png





azure-ad-b2cdotnet-aspnet-core-generalazure-ad-microsoft-account
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
0 Votes"
amanpreetsingh-msft answered TeguaycoGutirrez-1153 commented

Hi @TeguaycoGutirrez-1153 · Thank you for reaching out.

Unfortunately, this is not possible with B2C user flow or custom policy. This is only possible with applications created with below options under standard Azure AD tenants. This option is not available while registering application in B2C tenant.

58063-image.png

For signing in with Microsoft Accounts, the only option available as of now is adding Microsoft as IDP in the user flow or custom policy.


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

[2]: https://docs.microsoft.com/en-us/answers/articles/25904/verified-answers.html


image.png (17.1 KiB)
· 2
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 @TeguaycoGutirrez-1153 · Just following up, if you have any further question.

0 Votes 0 ·

Sorry, I did not see your answer. Thanks a lot for your response!

1 Vote 1 ·