I have the sales module with Financials for Dynamics 365 Online and I am trying to access the Web API using the starter code below. I have entered my credentials according to this blog at: dynamicscrmcoe.com/using-new-web-api. There is another 3rd party application using the api successfully, so I am presuming everything in Dynamics is setup correctly. The only thing I have noticed is that the code below, from Feb 2017, is using version 2.2x of Microsoft.IdentityModel.Clients.ActiveDirectory. The current version is 3.17. If that is what's causing the problem, how do I correct the code so it will function properly? What am I missing?
Thanks!
Starter Code:
*This post is locked for comments
A ticket has been Opened with Microsoft.
Just an Update . . . . I have been trying to connect with xrm tooling as above and am now getting a different error: "Unable to Login to Dynamics CRMOrganizationServiceProxy is null"
Still working on finding a solution.
The original code (with no updating) is not establishing a connection and throws the error in the try catch.
Ok. Let me ask question in a different way - what kind of problem did you mention in your first post?
Hi Andrew, Thanks for replying. I am using version 2.2 of the IdentityModel and it is what is returning the error. The program will not compile or run if I upgrade to version 3.
Hello,
Downgrade version of Microsoft.IdentityModel.Clients.ActiveDirectory to 2.2 version in NuGet references section. Check the last part of this article - butenko.pro/.../migrating-apps-microsoft-xrm-client-microsoft-xrm-tooling
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156