Hi @Stefano
Indeed! This is a problem caused by a delay, I can reproduce your problem locally and it seems to have a long delay.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
i'm trying to use this guide to get a token with a web app managed identity to send Mail as a user with Microsoft Graph
https://learn.microsoft.com/en-us/azure/app-service/scenario-secure-app-access-microsoft-graph-as-app?tabs=azure-powershell#prerequisites
var credential = new DefaultAzureCredential();
var token = credential.GetToken(
new Azure.Core.TokenRequestContext(
new[] { "https://graph.microsoft.com/.default" }));
var accessToken = token.Token;
var graphServiceClient = new GraphServiceClient(
new DelegateAuthenticationProvider((requestMessage) =>
{
requestMessage
.Headers
.Authorization = new AuthenticationHeaderValue("bearer", accessToken);
return Task.CompletedTask;
I run the powershell and i can see the permission in the enterprise application as shown in the link, but when i decode the token i can't see any role in it.
What could I done wrong? Is there something else i could check?
Thanks
Hi @Stefano
Indeed! This is a problem caused by a delay, I can reproduce your problem locally and it seems to have a long delay.
Hi ,
As far as what I understood you want to config to authenticate graph API through your app , if i am correct , you can follow the docs , Hope it will help you to fix your issue .
Thanks.