❔ ASP.NET Core WebAPI - Cannot choose the AuthenticationScheme for MicrosoftGraphs?
So I am using the Microsoft.Identity.Web Package to get the access token for a user. This works perfectly fine in Swagger.
AppSettings.Json
Startup.cs
The problem is when I try to access The Graph in a Get Method in the controller
I get an error on "CalendarCollectionResponse calendars = await graphServiceClient.Me.Calendars.GetAsync();"
I have come across this post
https://github.com/AzureAD/microsoft-identity-web/wiki/multiple-authentication-schemesto help me but in the latest version .Request() was removed. Any Ideas?
2 Replies
Looking into the Release Notes shows me the new correct way
https://github.com/AzureAD/microsoft-identity-web/blob/master/src/Microsoft.Identity.Web.GraphServiceClient/Readme.md
However now the error is
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.