InvalidAuthenticationToken with https://graph.microsoft.com/v1.0/me/calendar/events

Conchi Sanz 5 Reputation points
2023-10-05T14:58:43.9633333+00:00

I have a code to add an event in a calendar. The code has been working succesfully until few weeks ago when I got the following error:

{"error":{"code":"InvalidAuthenticationToken","message":"IDX14100: JWT is not well formed: 'PII of type 'Microsoft.IdentityModel.Logging.SecurityArtifact' is hidden. For more details, see [https://aka.ms/IdentityModel/PII.]', there are no dots (.).\nThe token needs to be in JWS or JWE Compact Serialization Format. (JWS): 'EncodedHeader.EndcodedPayload.EncodedSignature'. (JWE): 'EncodedProtectedHeader.EncodedEncryptedKey.EncodedInitializationVector.EncodedCiphertext.EncodedAuthenticationTag'.","innerError":{"date":"2023-09-27T09:52:24","request-id":"ecf7db65-e055-4b20-b5cd-1a3e746a7c6c","client-request-id":"ecf7db65-e055-4b20-b5cd-1a3e746a7c6c"}}}

The httpRequest for https://graph.microsoft.com/v1.0/me/calendar/events returns status 401.

I'm sending the following headers:

Content-Type=application/json

Authorization=Bearer theToken

Nothing seems to have changed in the system. What am I missing?

Thanks

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,809 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Yuri Grytsai 0 Reputation points
    2024-04-03T18:46:47.5733333+00:00

    Yes, I've got this problem as well. This is likely a token expiration. After obtaining a new token the issue will go 100%, try it.

    0 comments No comments