0
votes

I am trying to get data from Dynamics CRM Online, but cannot even authenticate and get an access token. The problem is that I am not able to call the AcquireToken method in my console application.

Anyone know how to authenticate and get an access token ?

I am using the below tutorial: https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/connect-customer-engagement-web-services-using-oauth

1
Are you getting any error?Arun Vinoth
Posting some code might help...Aron
You're failing on this line AuthenticationResult result = authContext.AcquireToken(resource, clientId, new Uri(redirectUrl));? Are you getting an exception?jasonscript

1 Answers

0
votes

The solution was to use ADAL.Net v2 library and not v3. The v3 library only supports the async method, whereas the v2 supports the non async method.