How can I resolve the "InvalidAuthenticationToken" error due to an improperly formatted JWT with too many dots when calling the graph api after sme time it start working normally

LOKESH K 0 Reputation points
2024-09-14T01:17:28.7866667+00:00

Hi everyone,

I'm encountering an issue with fetching chats from [API/Service Name]. When I attempt to call the API, I receive the following for message

Error fetching chats: 

It seems that the JWT token is not correctly formatted, with more dots than allowed. This issue seems to resolve itself intermittently. Note that it start working fine after the some time it start working normally

Can someone help me understand why this error occurs and how to fix it? Any insights on ensuring the token is correctly formatted or any best practices for handling JWT tokens would be greatly appreciated.

Thank you!

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
10,127 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,021 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,770 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.