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 :
Customer experience | Sales, Customer Insights,...
Suggested Answer

How to get a refresh token from Oauth2 and CrmServiceClient?

(0) ShareShare
ReportReport
Posted on by 25

Hello,


We are using CrmServiceClient to connect, the problem is that after 60 minutes the token expires and gives us a connection error.
We've been looking, but haven't found a way to refresh the token without calling the new CrmServiceClient(connectionStrings) method again.
Is there a way to refresh the token without having to create a new connection each time?

I have the same question (0)
  • Suggested answer
    RodRodriguez Profile Picture
    on at

    Howdy,

    The lifetime of a token is typically 60-90 minutes, that is by design.

    However, here is the information page about refresh tokens:

    docs.microsoft.com/.../refresh-tokens

    Also, here is another community discussion about token expiration:

    community.dynamics.com/.../825701

    Hope this helps!

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 70 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 43 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans