Getting Odata Error while calling Graph API

Mogadala, Ravi 0 Reputation points
2024-07-01T08:20:30.0066667+00:00
  • I used below solution to get email ID of the logged in user. git clone https://github.com/Azure-Samples/ms-identity-easyauth-dotnet-storage-graphapi.git cd 2-WebApp-graphapi-on-behalf
  • I am able to login successfully with login details. But iam facing an issue when iam calling Grap API.
  • Error details are below Exception of type 'Microsoft.Graph.Models.ODataErrors.ODataError' was thrown.########Microsoft.Graph.Models.ODataErrors.ODataError: Exception of type 'Microsoft.Graph.Models.ODataErrors.ODataError' was thrown. at Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter.ThrowIfFailedResponse(HttpResponseMessage response, Dictionary`2 errorMapping, Activity activityForAttributes) at Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter.SendAsync[ModelType](RequestInformation requestInfo, ParsableFactory1 factory, Dictionary2 errorMapping, CancellationToken cancellationToken) at Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter.SendAsync[ModelType](RequestInformation requestInfo, ParsableFactory1 factory, Dictionary2 errorMapping, CancellationToken cancellationToken) at Microsoft.Graph.Me.MeRequestBuilder.GetAsync(Action`1 requestConfiguration, CancellationToken cancellationToken) at WebApp_EasyAuth_DotNet.Pages.Graph_OBO.IndexModel.OnGetAsync() in C:\Work\2-WebApp-graphapi-on- behalf\Pages\Graph-OBO\Index.cshtml.cs:line 32, Learn about [building Web apps on Azure App Service] (https://docs.microsoft.com/en-us/azure/app-service/).
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,005 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.