question

KaranSawhney-4487 avatar image
0 Votes"
KaranSawhney-4487 asked RakeshJagatap-4451 commented

invalid_grant

I am able to generate the auth and refresh token for my app. But when I use the refresh token to regenerate the auth token it gives me the below error. Note that this used to work until last week for almost 2 years.

{
"error": "invalid_grant",
"error_description": "AADSTS70000: The user could not be authenticated as the grant is expired. The user must sign in again.\r\nTrace ID: dfe52903-9975-4945-a9bf-f07b390ff101\r\nCorrelation ID: b90a7d1c-25de-4bda-b739-dd5911524a69\r\nTimestamp: 2021-08-12 07:26:15Z",
"error_codes": [
70000
],
"timestamp": "2021-08-12 07:26:15Z",
"trace_id": "dfe52903-9975-4945-a9bf-f07b390ff101",
"correlation_id": "b90a7d1c-25de-4bda-b739-dd5911524a69",
"error_uri": "https://login.microsoftonline.com/error?code=70000"
}

@EricUrban-MSFT

azure-ad-multi-factor-authenticationadvertising-api
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Just checking in to see if the below answer helped. If this answers your query, please don’t forget to click "Accept the answer" and Up-Vote for the same, which might be beneficial to other community members reading this thread. And, if you have any further query do let us know.
Thanks,

0 Votes 0 ·

@KaranSawhney-4487 , I just wanted to check in and see if you had any other questions or if you were able to resolve this issue? If you have any other questions, please let me know.

Thank you for your time and patience throughout this issue. Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

0 Votes 0 ·

Hi, if the posted answer resolves your question, please mark it as the answer by clicking the check mark. Doing so helps others find answers to their questions.

0 Votes 0 ·

1 Answer

sikumars-msft avatar image
1 Vote"
sikumars-msft answered

Hello @KaranSawhney-4487,

Thanks for reaching out.

I think you are trying to get access token for Bing Ads API, please correct me if that's not a case in above sceanrio also could you please confirm account type which is being used? ( work/school OR MSA account? )

I was able to regenerate the auth token by using refresh_token as per this link without any issue so I would recommend you to try this PowerShell way, if that works for you then I guess this issue more on module that you are using to get access token.

I had seen this similar issue when you try getting auth token through Python modules and issue got resolved by updating BingAds Python module update.

Please let me know how that goes. Thanks


Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.