microsoftgraph / msgraph-sdk-serviceissues

Tracks service issues for follow up.
5 stars 0 forks source link

CompactToken parsing failed with error code: 80049217 #32

Open victormarcus opened 3 years ago

victormarcus commented 3 years ago

We are using the following libraries:

  1. microsoft-sdk-java-auth 0.2.0
  2. microsoft-graph 2.3.1
  3. microsoft-graph-core 1.0.5

java.util.List<String> scopes = new java.util.ArrayList<String>(); scopes.add("https://graph.microsoft.com/.default"); ClientCredentialProvider authProvider = new ClientCredentialProvider(clientId, scopes, clientSecret, tenantId, NationalCloud.Global); IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider(authProvider).buildClient(); User user = graphClient.users(emailAddress).buildRequest().get();

We get this error sometimes while fetching any user's details. ex- https://graph.microsoft.com/v1.0/users/email-addr@domain.com

Trace: com.microsoft.graph.http.GraphServiceException: Error code: InvalidAuthenticationToken Error message: CompactToken parsing failed with error code: 80049217

GET https://graph.microsoft.com/v1.0/users/email-addr@domain.com SdkVersion : graph-java/v2.3.1 Authorization : [PII_REDACTED]

401 : Unauthorized com.microsoft.graph.http.GraphServiceException.createFromConnection(GraphServiceException.java:501) at com.microsoft.graph.http.CoreHttpProvider.handleErrorResponse(CoreHttpProvider.java:503) at com.microsoft.graph.http.CoreHttpProvider.sendRequestInternal(CoreHttpProvider.java:423) at com.microsoft.graph.http.CoreHttpProvider.send(CoreHttpProvider.java:220) at com.microsoft.graph.http.CoreHttpProvider.send(CoreHttpProvider.java:200) at com.microsoft.graph.http.BaseRequest.send(BaseRequest.java:345) at com.microsoft.graph.requests.extensions.UserRequest.get(UserRequest.java:171)

MIchaelMainer commented 3 years ago

Does it reproduce on the same users? Is it possible that there are users in an on-premise linked AD in your organization?

petrhollayms commented 4 months ago

Thank you for reporting this issue. This appears to be an issue or limitation with the service APIs. Unfortunately, as the Microsoft Graph SDK team, we do not have ownership of the APIs that are causing you issues. We invite you to create a question about the service API to Microsoft Q&A and tagged with one of the [microsoft-graph-*] tags, that way it will get routed to the appropriate team for them to triage:

https://aka.ms/msgraphsupport or directly https://aka.ms/askgraph

For now, we will close the issue on our side but feel free to open it in the relevant repository if you think the issue is specific to SDK. Please let us know if this helps!

Note: We will close this repository on April 19, 2024.