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.
InvalidAuthenticationToken with https://graph.microsoft.com/v1.0/me/calendar/events
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