Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure during access token acquisition via refresh token causes useless exception #32

Open
shiftylogic opened this issue Dec 16, 2016 · 4 comments

Comments

@shiftylogic
Copy link

shiftylogic commented Dec 16, 2016

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

@oatsoda
Copy link

oatsoda commented Dec 19, 2016

FYI I originally logged this as issue 31 but closed it when I thought it was either a Graph SDK issue or a problem with the OneDrive API itself.

@oatsoda
Copy link

oatsoda commented Jan 17, 2017

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...

@23W
Copy link

23W commented Feb 22, 2017

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?

@oatsoda
Copy link

oatsoda commented Jan 14, 2019

Is this SDK still being maintained? Are we supposed to still be using it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants