0
votes

I'm following this documentation to get an access token to call Graph APIs for Outlook Calendar. I've registered my app on Azure AD admin center, created a client secret and exposed relevant APIs. The app is configured for multi-tenant access and I'm using OAuth v2.0 endpoints for authorization.

I can successfully get the authorization code but get this error when requesting an access token:

"error": "invalid_client",

"error_description": "AADSTS7000215: Invalid client secret is provided.",

"error_codes": [

    7000215

],

I send urlencoded client secret with the access token request, as mentioned here

1
Could you show how you are acquiring the token? - juunas
And what does the request for the access token look like? - juunas
Did you have a try with creating a new client secret? And please provide your request for the access token. - Allen Wu
Url: login.microsoftonline.com/organizations/oauth2/v2.0/token with form-urlencoded parameters: client_id: <my_client_id> client_secret: <urlencoded_client_secret> code: <access_code> redirect_uri: <uri> grant_type: authorization_code scope: openid+offline_access+Calendars.Read - Shubhankar

1 Answers

0
votes

You provided an invalid client secret.

Just copy it from Azure AD app and paste it into your request. There is no need to url encode it.