question

NMarkGraves avatar image
0 Votes"
NMarkGraves asked JR-1619 published

await graphClient.Me.Request().GetAsync() never returns

In the following code, the call to await graphClient.Me.Request().GetAsync(); never returns.

No exception is thrown. The App ID is registered with https://portal.azure.com/ for our tenant ID. The auth was originally some preview package, but I've since tried with Microsoft.Identity.Client and that doesn't work either.


 protected async void GetMessages()
 {
     try
     {
         var scopes = new string[] { 
                 "User.Read", "Mail.Read", "email", "Mail.ReadWrite", "Mail.Send", "profile", "User.Read" 
             };

         // Build a client application.
         IPublicClientApplication publicClientApplication = PublicClientApplicationBuilder
                     .Create(MyRegisteredAppIDGUID)
                     .WithTenantId(OurTenantIDGUID)
                     .Build();

         // Create an authentication provider by passing in a client application and graph scopes.
         DeviceCodeProvider authProvider = new DeviceCodeProvider(publicClientApplication, scopes);

         // Create a new instance of GraphServiceClient with the authentication provider.
         var graphClient = new GraphServiceClient(authProvider);

         User me = await graphClient.Me.Request().GetAsync();

         ;
     }
     catch (Exception ex)
     {
     }
 }
microsoft-graph-sdk
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

JR-1619 avatar image
0 Votes"
JR-1619 answered JR-1619 published

Did you resolve this issue. I am also facing the same issue.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.