CompactToken parsing failed with error code: 80049217

poovarasan d 60 Reputation points

Hi team

i use the me/calendars API to get the all calendars from the outlook for the user, it works in local server(send 200 server response), but it not works in ngnix server where i uploaded. it respond with below error code , i gave the access for, and calendars.readwrite permissions. and i attach the code which i used

{"error":{"code":"InvalidAuthenticationToken","message":"CompactToken parsing failed with error code: 80049217","innerError":{"date":"2023-03-10T10:23:09","request-id":"cd6902ba-b1a7-4d2f-abad-e02bd2454f78","client-request-id":"cd6902ba-b1a7-4d2f-abad-e02bd2454f78"}}}

User's image

A family of Microsoft email and calendar products.
2,878 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,446 questions
Outlook Management
Outlook Management
Outlook: A family of Microsoft email and calendar products.Management: The act or process of organizing, handling, directing or controlling something.
4,850 questions
0 comments No comments
{count} votes

Accepted answer
  1. Anonymous

    Hello poovarasan d,

    Thanks for reaching out!

    This error message "CompactToken parsing failed with error code: 80049217" generally occurs when the token used is invalid.

    When we try to generate Access Token from{tenant-id}/oauth2/v2.0/token, we would get JSON object contains some properties. We just need the value in access_token key.

    And when using the token, the Authorization header should be Bearer <access_token value>

    Hope this helps.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have further questions about this answer, please click "Comment".

    0 comments No comments

0 additional answers

Sort by: Most helpful