Getting error while get access token?

Ronak Bhatti 1 Reputation point
2022-08-18T11:03:39.373+00:00

I am trying to get access token for outlook calendar api using "https://login.microsoftonline.com/your_tenant/oauth2/v2.0/token" api but, i am getting the error.
see the screen shot : https://drops.meetanshi.com/AdYIG9

You can download our postman colleftion through this link : https://drops.meetanshi.com/0tXEmF

can you help us to get access token? and can you provide outlook calendar api to us?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,567 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 36,891 Reputation points
    2022-08-19T09:29:46.893+00:00

    Hi @Ronak Bhatti

    From the screenshot of your postman there is an obvious error, you should put the client secret value instead of the client secret ID in the client_secret parameter.

    232815-2022-08-19-172550.png

    After you get the access token correctly, you will be able to use it to call the calendar api.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.