When I try to generate access token for a user in Outlook and then Exchanging Access Token for graph Api it failed with malformed error.
To generate access token, I passed these values
Complete error is:
{
"error": "invalid_grant",
"error_description": "AADSTS9002313: Invalid request. Request is malformed or invalid.\r\nTrace ID: ba68002d-e58b-4d65-9e61-6e5ca2845500\r\nCorrelation ID: 03ee058c-38cb-407d-9b88-f51b7c992464\r\nTimestamp: 2022-10-19 15:05:17Z",
"error_codes": [
9002313
],
"timestamp": "2022-10-19 15:05:17Z",
"trace_id": "ba68002d-e58b-4d65-9e61-6e5ca2845500",
"correlation_id": "03ee058c-38cb-407d-9b88-f51b7c992464",
"error_uri": "https://login.microsoftonline.com/error?code=9002313"
}
I granted these permissions with consented
What does the error mean grant type is wrong, or endpoint is not valid? Or Am I missing any permissions? Please help me in resolving the error