Home > Back-end >  GraphServiceClient: Operation is not supported on this platform (using Blazor - Microsoft Graph)
GraphServiceClient: Operation is not supported on this platform (using Blazor - Microsoft Graph)

Time:06-03

I'm trying to do the following in Blazor:

public GraphServiceClient GraphClient { get; set; } = new(new AccessTokenProviderTokenCredential(AccessTokenProvider));

But I have the following error message:

enter image description here

Is GraphServiceClient not allowed in Blazor? Or am I doing something wrong? Thank you.

CodePudding user response:

The default HttpProvider is not supported in Blazor. You can use GraphServiceClient if you provide your own IHttpProvider or use the constructor that takes a HttpClient.

See this enter image description here

  • Related