Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

OAUTH Refresh Token returns 404 Not Found error

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

I successfully retrieved Access and Refresh tokens from Azure AD using OAuth Authorization. Now, I am trying to get a new token using the refresh token. 

Followed the example here: https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-protocols-oauth-code

and I am sending the following in a post to https://login.microsoftonline.com/<client-id>/oauth2/token end point. The client-id is the Application ID of the application that I got the refresh_token for using the authorization end-point.

POST /{tenant}/oauth2/token HTTP/1.1

Host: https://login.microsoftonline.com

Content-Type: application/x-www-form-urlencoded

client_id=6731de76-14a6-49ae-97bc-6eba6914391e &refresh_token=OAAABAAAAiL9Kn2Z27UubvWFPbm0gLWQJVzCTE9UkP3pSx1aXxUjq... &grant_type=refresh_token

&resource=https%3A%2F%2Fservice.contoso.com%2F

&client_secret=JqQX2PNo9bpM0uEihUPzyrh

The response I get is a 404 Not Found. Please let me know what I am missing here.

Thanks!

*This post is locked for comments

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: OAUTH Refresh Token returns 404 Not Found error

    see below link it may helps you

    crmshop.wordpress.com/.../oauth-authenticationwith-out-using-adal-to-dynamics-365-using-azure-apps

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: OAUTH Refresh Token returns 404 Not Found error

    Is there a way to turn on logging/tracing on Dynamics 365 Online for my tenant to see what is causing the 404 Not Found error?

    Thanks!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,307 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans