Forum Discussion
Invalid S2S auth token error for API requests
LainRobertson
Thanks Lain,
When making a request with an expired Access Token, the MS Graph API returns a 401 status code with the message: Access token has expired or is not yet valid.
In the case I have described, the response returns a 403 status code with the message Invalid S2S auth token plus something that looks like an internal error.
Thanks,
Hagar
Sorry, Hagar - you're quite correct. I focused on the recurrent interval and didn't pay attention to the HTTP code.
It does feel though like the HTTP 403 is the symptom rather than indicative of the cause, given the retry is successful. It's almost like the async ticket refresh is successful under the hood, but whatever made the call wasn't happy about waiting for it to successfully complete.
But that's pure speculation since I've never before seen the modules from that exception stack. It's more just a gut feeling.
I'm afraid I'm no help on this one.
Cheers,
Lain