dcblogdev / laravel-microsoft-graph

Laravel package for Microsoft Graph API (Microsoft365)

Home Page:https://dcblog.dev/docs/laravel-microsoft-graph

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

InvalidAuthenticationToken, CompactToken parsing failed with error code: 80049217

overwise opened this issue · comments

After a successful login, upon returning to the redirect URI, I get:

{
   "error":{
      "code":"InvalidAuthenticationToken",
      "message":"CompactToken parsing failed with error code: 80049217",
      "innerError":{
         "date":"2022-10-10T10:54:32",
         "request-id":"18925d88-bfc6-4d27-b579-7648264e1221",
         "client-request-id":"18925d88-bfc6-4d27-b579-7648264e1221"
      }
   }

I don't even know where to start with debugging, to be honest.

Fixed it.
In case someone else gets stuck with this...
I think the problem was that I didn't use MsGraphAuthenticated middleware for the redirect URI route. After adding that, everything seems to work fine.