You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an issue filed against the Microsoft Graph .NET library that we are moving here since it is actually being triggered by the OneDrive auth provider. The original issue is here filed by @oatsoda.
If a failure happens during acquisition of an access token via refresh token (user changes password, revokes app, etc), the Microsoft Graph Core HttpProvider attempts to deserialize the OAuth error and it fails. The reason is that the HttpProvider built into Microsoft Graph Core was meant for processing OData requests that honor a very specific error format. The OAuth error (and any other error for that matter) likely won't match that pattern and therefore the deserialization fails. We catch that exception but end up throwing a very generic exception instead. This loses all the valuable information that the developer could have used to debug this issue.
The HttpProvider was not written to be used outside the context of making OData calls. I'm not sure that the MSA Auth Provider should be using the HttpProvider inside Microsoft.Graph.Core.dll for doing authentication related work. In the regular Microsoft Graph library, we use MSAL for all our authentication needs so do not have this same issue.
Is there any comment on this issue? We see a lot of exceptions in our client code when a user has changed their password or have revoked their token etc...
I have the same problem. If user has rejected application on its app managing page, code will receive "general exception" without any useful information. Looks like this lib is no supported, isn't it?
This is an issue filed against the Microsoft Graph .NET library that we are moving here since it is actually being triggered by the OneDrive auth provider. The original issue is here filed by @oatsoda.
If a failure happens during acquisition of an access token via refresh token (user changes password, revokes app, etc), the Microsoft Graph Core HttpProvider attempts to deserialize the OAuth error and it fails. The reason is that the HttpProvider built into Microsoft Graph Core was meant for processing OData requests that honor a very specific error format. The OAuth error (and any other error for that matter) likely won't match that pattern and therefore the deserialization fails. We catch that exception but end up throwing a very generic exception instead. This loses all the valuable information that the developer could have used to debug this issue.
The HttpProvider was not written to be used outside the context of making OData calls. I'm not sure that the MSA Auth Provider should be using the HttpProvider inside Microsoft.Graph.Core.dll for doing authentication related work. In the regular Microsoft Graph library, we use MSAL for all our authentication needs so do not have this same issue.
FYI @Cbales
The text was updated successfully, but these errors were encountered: