microsoftgraph / msgraph-sdk-android

Microsoft Graph SDK for Android! https://graph.microsoft.io
Other
51 stars 43 forks source link

Unauthorized error can't be handled #104

Closed croitor-ivan closed 4 years ago

croitor-ivan commented 5 years ago

I have an authResult(adal) instance that returns false on the "isExpired()" invocation.

Even, the auth session seems to not be expired. When a request is being made to via graph SDK, I receive a 401 Unauthorized exception with:

{"code":"InvalidAuthenticationToken","message":"Access token has expired.","innerError":{"request-id":"86c649ec-b370-4c7f-8347-2b686e35fe93","date":"2019-04-17T08:23:53"}}

the whole problem is that internally, there is no possibility to handle the error as the GraphServiceException.getServiceError() invocation returns null.

See the screenshot for a DEBUG sample.

Screenshot 2019-04-17 at 11 55 03
baywet commented 4 years ago

Hi everyone, Thank you for the contribution, we have moved away from an android specific SDK to a Java SDK and this repo will be archived very soon. If you're still facing the same issue with the Java SDK, feel free to re-open an issue over there. Closing.