blazor-server-aad-sample
blazor-server-aad-sample copied to clipboard
Use with OnBehalfOfProvider
HttpContext.GetTokenAnsync("access_token") does not return a valid JWT token (as it does for "refresh_token" and "id_token"). So, how can it be used in a Microsoft Graph call using the OnBehalfOfProvider, like the code below?
var users = await GraphServiceClient.Users.Request.Filter("[some filter]").WithUserAssertion(new UserAssertion(accessToken)).GetAsync()
Note: UserAssertion(id_token) works.