Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Consume Dynamic CRM REST API from other application using OAuth Tokens

(0) ShareShare
ReportReport
Posted on by 105

Hi All,

I am new to OAuth token Concept. So i have few queries?

1. Should i get a new "access token" for each "HTTP GET request made to the CRM REST API"?

2. What should i do with the "refresh token"?

3. Should i permanently store any of the tokens in the client application?

Thankyou

*This post is locked for comments

  • Suggested answer
    Shaminderpal Singh Profile Picture
    1,565 on at
    RE: Consume Dynamic CRM REST API from other application using OAuth Tokens

    Hi Bhavik,

    Please mark the answer as verified if it worked for you.

    -shaminder

  • Suggested answer
    Shaminderpal Singh Profile Picture
    1,565 on at
    RE: Consume Dynamic CRM REST API from other application using OAuth Tokens

    Hi,

    That depends on how are you implementing your application.

    If you are writing it client side where tokens would be generated in browser, implement implicit grant which gives short lived access token only

    Implementation Detail-docs.microsoft.com/.../v1-oauth2-implicit-grant-flow

    If you are implementing it in web service (passive mode interaction), then implement client credentials flow which would also generate access token only that are valid for an hour. You can cache it for an hour and then regenerate it.

    Implementation Detail-docs.microsoft.com/.../v1-oauth2-client-creds-grant-flow

    If you are implementing it in server side based application where user will be interacting and providing credentials then implement authorization code flow grant where you can make use of refresh tokens and silently acquire access tokens.

    Implementation Detail-docs.microsoft.com/.../v1-protocols-oauth-code

    -Shaminder

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans