Error AADSTS70000121: The passed grant is from a personal Microsoft account and is required to be sent to the /consumers or /common endpoint while trying to redeeem the code to get access token so that I could get the Microsoft Ads Cost data via API

Jade Nguyen 11 Reputation points
2022-04-21T01:10:40.607+00:00

I followed the following guideline from Microsoft with the goal of getting Microsoft Ads cost data by API. So I got the code and now as a next step, I need to redeem the code to get an access token and refresh token. However, I encountered the same error message when I was trying to get an access token via Postman. Appreciate help.

Guideline:: https://learn.microsoft.com/en-us/advertising/guides/authentication-oauth-get-tokens?view=bingads-13

{
"error": "invalid_grant",
"error_description": "AADSTS70000121: The passed grant is from a personal Microsoft account and is required to be sent to the /consumers or /common endpoint.\r\nTrace ID: e5bc81d2-56e6-4ee9-a425-c5aac7628400\r\nCorrelation ID: 92b2614a-00a8-4837-8dac-4cd79a71af9a\r\nTimestamp: 2022-04-21 00:54:02Z",
"error_codes": [
70000121
],
"timestamp": "2022-04-21 00:54:02Z",
"trace_id": "e5bc81d2-56e6-4ee9-a425-c5aac7628400",
"correlation_id": "92b2614a-00a8-4837-8dac-4cd79a71af9a"
}

Microsoft Advertising API
Microsoft Advertising API
A Microsoft API that provides programmatic access to Microsoft Advertising to manage large campaigns or to integrate your marketing with other in-house systems.
402 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bill Mattern 1 Reputation point
    2022-07-11T15:29:35.967+00:00

    You should include your script here, it seems like the api endpoint you are using could be wrong.