web
You’re offline. This is a read only version of the page.
close
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

I have the same question (0)
  • Suggested answer
    Shaminderpal Singh Profile Picture
    1,565 on at

    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

  • Suggested answer
    Shaminderpal Singh Profile Picture
    1,565 on at

    Hi Bhavik,

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

    -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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans