Closed fcatae closed 7 years ago
The current code does not trigger event OnAuthorizationCodeReceived. As a consequence, the graph API does not work properly.
OnAuthorizationCodeReceived
app.UseOpenIdConnectAuthentication(new OpenIdConnectOptions() { AutomaticChallenge = true, CallbackPath = new PathString(CallbackPath), ClientId = ClientId, Authority = Authority, PostLogoutRedirectUri = PostLogoutRedirectUri, SignInScheme = CookieAuthenticationDefaults.AuthenticationScheme, Events = new OpenIdConnectEvents() { OnAuthenticationFailed = OnAuthenticationFailed, OnAuthorizationCodeReceived = OnAuthorizationCodeReceived } });
The current impact is any access to Graph API such as getting user image, name, manager, role, etc.
Solution: Force the api to return both the id_token and code.
OpenIdConnectOptions() { ... ResponseType = OpenIdConnectResponseType.CodeIdToken, ... }
The current code does not trigger event
OnAuthorizationCodeReceived
. As a consequence, the graph API does not work properly.The current impact is any access to Graph API such as getting user image, name, manager, role, etc.