Azure-Samples/ms-identity-dotnet-webapi-azurefunctions

invalid_grant Error

srinivasponnada opened this issue · 0 comments

When i try to invoke the endpoint https://login.microsoftonline.com/common/oauth2/v2.0/token using the Code that i fetched from /authorize, i get this error in postman:

{
"error": "invalid_grant",
"error_description": "AADSTS9002313: Invalid request. Request is malformed or invalid.\r\nTrace ID: f86ee3a2-1c21-48b0-97fb-ab08841b2100\r\nCorrelation ID: b5de6866-5136-40f0-a128-b54f8cc9be2b\r\nTimestamp: 2020-07-08 13:34:18Z",
"error_codes": [
9002313
],
"timestamp": "2020-07-08 13:34:18Z",
"trace_id": "f86ee3a2-1c21-48b0-97fb-ab08841b2100",
"correlation_id": "b5de6866-5136-40f0-a128-b54f8cc9be2b",
"error_uri": "https://login.microsoftonline.com/error?code=9002313"
}

Would appreciate if someone can help me resolve this.