question

Jode-8748 avatar image
0 Votes"
Jode-8748 asked ·

AADSTS70000: The provided value for the 'code' parameter is not valid

Hi,

I'm making a call to request an access token and the majority of the time it works but some times I receive..

 {"status":500,"message":"AADSTS70000: The provided value for the 'code' parameter is not valid.\r\nTrace ID: b8b34c6a-50c8-47af-a2ba-27462ec42c00\r\nCorrelation ID: 85665e22-72d2-4db7-9f66-41cf489dcf84\r\nTimestamp: 2020-05-22 21:34:26Z"}

This is baffling as to how it can randomly fail at I'd say 2 out of 10 times.

The code value sent is correct..

 "grant_type=authorization_code&redirect_uri=http%3A%2F%2Flocalhost%3A9003%2Fstrategy%2Fmsgraph%2Fcallback&client_id=<redacted>&client_secret=<redacted>&code=M2589893b-586f-4f99-d76a-7ae27b8a85f7"

The authorization url is https://login.microsoftonline.com/common/oauth2/v2.0/authorize?prompt=select_account

The token url is https://login.microsoftonline.com/common/oauth2/v2.0/token

I've tried both consumers and common tenants and both fail equally.

From what I can tell there are absolutely zero differences in the request. In-fact I've just checked a previously working app registration I have and now that has the same issue.

Any ideas?

azure-active-directory
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

thameera-8332 avatar image
1 Vote"
thameera-8332 answered ·

We are seeing this error intermittently today as well, since about 18:00 UTC on 22nd. It was working fine all along. Did anything change on the Azure side?

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.