Skip to main content

Notifications

Announcements

No record found.

Service | Customer Service, Contact Center, Fie...
Unanswered

CrmServiceClient Token refreshed every 5 minutes

(0) ShareShare
ReportReport
Posted on by 20

Hi,

I am developing a program that is communicating whith Dynamics 365 Online. I wrote a piece of code that is authenticating using OAuth to Dynamics 365.

I am using the latest version of package Microsoft.CrmSdk.XrmTooling.CoreAssembly.

Here are the results of a test program that sends WhoAmI request every 30 seconds through new instace of CrmServiceClient. If token is different from previous one it is printed out.

I am using RequireNewInstance=false in Connection string. Shouldn't token be valid for 60 or more minutes, I get new one every 5 minutes?

pastedimage1656407262252v1.png

pastedimage1656407301127v2.png

When I run this piece of code:

pastedimage1656407375080v3.png

and inspect token it says it is valid for an hour.

pastedimage1656407452110v4.png

Is there a problem in CrmServiceClient or I need configure something?

Thanks in advance.

Daniel

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: CrmServiceClient Token refreshed every 5 minutes

    Hi DKozul,

    Maybe you refer the following link:

    Dynamics CRM Web API C# Auto Refresh Access Token while performing API request to CDS – xrm CRM Dynamics (wordpress.com)

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans