dotnet / dotnet/aspnetcore

MicrosoftAccount should use OIDC (was: AddMicrosoftAccount & Azure Active Directory - App registrations signin/signout problems)

Open
#10,037 17 comments 0 reactions 0 assignees View on GitHub
affected-medium area-auth enhancement severity-minor
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

## Problem Description:

If a user logs in from an ASP.NET Core application using the AddMicrosoftAccount extension method, it is impossible to change user on the aad, because the app does an auto login if only one aad account is logged in.

If 2 aad accounts are logged in, then it waits, and I can choose. This is correct.

If only 1 aad user is logged in, and if I click the popup window to change an account, I then get a Correlation failed exception (If I’m fast enough to complete the login) in the ASP.NET Core application.

The auto login breaks everything.

a) How can you turn this off?
b) How can you logout from the ASP.NET Core application? The signout is not sent to the aad APP Registration. This is possible in the Azure Portal. Maybe I want to logout in the aad using the application.

## Code to reproduce:

https://github.com/damienbod/AspNetCoreID4External/blob/master/src/IdentityServerWithAspNetIdentity/Startup.cs#L61-L67

Azure Portal

Used Azure Active Directory / App registrations to configure the client.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.