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

Teguayco Gutiérrez 26 Reputation points
2021-01-15T14:37:52.177+00:00

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

Developer technologies | ASP.NET | ASP.NET Core
Microsoft Security | Microsoft Entra | Microsoft Entra External ID
Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

Accepted answer
  1. AmanpreetSingh-MSFT 56,871 Reputation points Moderator
    2021-01-19T09:49:19.247+00:00

    Hi @Teguayco Gutiérrez · 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.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.