If you configure Azure AD the following exception is thrown at startup:
Unhandled Exception: System.InvalidOperationException: The OpenIddict validation handler cannot be registered as an authentication scheme.
This may indicate that an instance of the OAuth validation or JWT bearer handler was registered.
Make sure that neither 'services.AddAuthentication().AddOAuthValidation()' nor 'services.AddAuthentication().AddJwtBearer()' are called from 'ConfigureServices'.
Removing the "AddOAuthValidation" line from the AddAuthentication allows AzureAD users to access the admin UI.
If you configure Azure AD the following exception is thrown at startup:
Unhandled Exception: System.InvalidOperationException: The OpenIddict validation handler cannot be registered as an authentication scheme. This may indicate that an instance of the OAuth validation or JWT bearer handler was registered. Make sure that neither 'services.AddAuthentication().AddOAuthValidation()' nor 'services.AddAuthentication().AddJwtBearer()' are called from 'ConfigureServices'.
Removing the "AddOAuthValidation" line from the AddAuthentication allows AzureAD users to access the admin UI.