Friday, 28 April 2017

Troubleshooting web service authentication Dynamics 365 for Operations

In this post I just wanted to highlight the event viewer logs on a developer box. Make good use of it – not just for web services but for most errors.

Below is a recently problem I was troubleshooting.

I was working on the Microsoft github integration project to do a proof of concept using odata. I had problems with the authentication. I was able to retrieve the token from Azure AD however the odata authentication piece failed with D365O.

I got this error “Microsoft.OData.Client.DataServiceClientException: Unauthorized” 

image

In debug I got down to this “Unknown user type” error.

image

So, after looking at the event viewer. Expand Applications and Service Logs > Microsoft > Dynamics > AX-IntegrationCommon > Operational

image

image

From the error I found that the tenant which is blurred was different. I had 2 Azure subscription.

All I had to do what runt he Admin Provisioning tool against the tenant I wanted to do the integration with. Then all worked fine.

Another way I could have done this troubleshooting is by using Fiddler. Maybe in the next blog.

Reference:

2 comments:

Santosh kumar Singh said...

Nice post and good quality contents keep it up.Feel free to give me some tips for my blog

http://daynamicsaxaptatutorials.blogspot.in/

Anonymous said...

I had a similar problem a couple of weeks ago, and I couldn't fix it on my own, even the IT team gave up. Thank god there was Anegis Consulting to help us! Visit my website to find out more about them.