Registering your client app to access Dynamics through WebAPI

By | December 13, 2018

A couple of hours, and I finally got my Dynamics authentication token in PostMan! The rest will be all about using that token, but, if you have not tried setting up PostMan before and don’t want to spend a couple of hours figuring out the authentication part.. Maybe this post will help.

Actually, the essence of the process is described in details here:

https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/webapi/setup-postman-environment

So, when trying to get the authentication token, and if you get an error like this:

Message: AADSTS50011: The reply url specified in the request does not match the reply urls configured for the application: …

Make sure you are actually using the same reply url in the PostMan environment settings that you used to configure the application in Azure:

image

In my case, I just did not use https in one place, but used it in the other:

image

Literally, I was using a different reply URL. Took me a little while to figure it out.

Still, if it’s the first time you are going over the registration process, you might be trying different parameters in the attempt to get it to work, you may also get this kind of error:

AADSTS700016: Application with identifier YYY was not found in the directory ZZZ

If this happens, just make sure to use Azure ApplicationId :

image

For the PostMan clientId variable:

image

With that, everything should work.

So that’s it.. my little “feel like a beginner again” post is ready – happy WebAPI-ing!

Leave a Reply

Your email address will not be published. Required fields are marked *