-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
I am trying to get OData authorization working with the new Microsoft.Identity.Web library and when I set up the ODataAuthorization I get:
System.InvalidOperationException: No authenticationScheme was specified, and there was no DefaultChallengeScheme found. The default schemes can be set using either AddAuthentication(string defaultScheme) or AddAuthentication(Action<AuthenticationOptions> configureOptions).
I am calling this repos code as follows:
services.AddODataAuthorization(options =>
{
options.ConfigureAuthentication().AddMicrosoftIdentityWebApi(Configuration, "AzureAd");
});
I figured since the README shows
options.ConfigureAuthentication().AddJWTAuthenticationScheme();
I could just do what I'm doing above without issue but it seems like either it's not hooked up or I'm missing some config piece for leveraging the new identity lib; maybe I'm not supposed to use it all? I tried the AddJWT scheme line as well with the same result.
I think having an example using Azure AD would be helpful, or at least some documentation somewhere regarding the Microsoft.Identity.Web lib.
Tiberriver256
Metadata
Metadata
Assignees
Labels
No labels