Personalized Community is here!
Quickly customize your community to find the content you seek.
Microsoft Customer Co-creation
Help impact how the tools and services you rely on are developed. Microsoft Customer Co-creation connects you directly with our engineers so you can provide feedback before a single line of code is written. Interested? Learn more at Microsoft Customer Co-creation
2021 Release Wave 2Discover the latest updates and new features releasing from October 2021 through March 2022.
2021 release wave 2 plan
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
I have a strange problem. My class for providing instances of OrganizationServiceProxy uses tokens to validate access to CRM through web services. I implemented custom class that inherits from OrganizationServiceProxy called ManagedTokenOrganizationServiceProxy using the pattern described on this https://github.com/ali-sharifi/DynamicsCRMConnectionHelper.
I made custom app to make a query against service every 10 minutes. Everything is fine until token does not exipire, then i get error: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.
What is more strange is that 15 minutes before token expires renew procedure is run and _proxy.Authenticate() is called but token is not refreshed.
Does anyone has any idea why token is not refreshed? What am I doing wrong?
Here is recommendation that I heard from product team - stop using OrganizationServiceProxy. Start using XrmTooling because it takes care of all the issues you can experience - authentication, token renewal, e.t.c.
Thank you for your recommendation but I don't have experience with suggested. Also I have this implemented on many projects, on some it works on some doesn't.
I can't afford to change it now so I am looking for some logical reason why this doesn't work because it should work.
Tokens are supposed to be renewed.
Good luck in finding an answer (no sarcasm, I really wish you luck). Even you don't want to follow approach recommended by product team here is a reference where you can start learning XrmTooling - docs.microsoft.com/.../build-windows-client-applications-xrm-tools and here is my post that describes how to change your code from XrmClient to XrmTooling - butenko.pro/.../migrating-apps-microsoft-xrm-client-microsoft-xrm-tooling I believe you use some variation of XrmClient in your apps.
I've encountered a similar problem that CrmServiceClient does not address as suggested. I am using CrmServiceClient as a singleton to enable quick loading of resources etc and once the security token expires that it. Only restarting and thus instanciating the class will fix it.
Business Applications communities