Microsoft.Graph.Models.ODataErrors.ODataError: Exception of type 'Microsoft.Graph.Models.ODataErrors.ODataError' was thrown.
Angelica
15
Reputation points
Good afternoon Community,
I am having an issue when querying Graph API from a console app as it keeps giving me the following error when a very simple odata query is built:
Error trying to query ADD data 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, ParsableFactory`1 factory, Dictionary`2 errorMapping, CancellationToken cancellationToken)
at Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter.SendAsync[ModelType](RequestInformation requestInfo, ParsableFactory`1 factory, Dictionary`2 errorMapping, CancellationToken cancellationToken)
at Microsoft.Graph.Users.UsersRequestBuilder.GetAsync(Action`1 requestConfiguration, CancellationToken cancellationToken)
The query works perfectly when I execute the console app locally on my laptop but now that I am migrating this little console app into an Azure virtual machine, then the communication to Graph API is generating the errors mentioned above.
I am running out of ideas, does anyone know what can I do here, please? Many thanks in advance.
Please see below the API permissions
Microsoft Security Microsoft Graph
13,721 questions