Monday, February 17, 2020

D365FO Web API registration for POST MAN

Most of the time we used 3rd Party tool like fiddler, Post Man and SoupUI as client to consume web services.


In this blog i will explain, How can we use POST MAN to consume Web-API by using Oauth2 Azure Authentication.


Step-1 Download the POST MAN from the this link.

Step-2 Register The Azure Application (Web API). You can follow this link

Step-3 Add the below URL in Reply URL section https://www.getpostman.com/oauth2/callbackcheck the below screen shot.



Step-4 Once App registration completed Enter Application ID in D365FO

Reference screenshot

Step-5 Open POST man and navigate to Authorization Tab and select OAuth2 as Authentication Type.

Reference screenshot


Step-6 click on Get New Access Token. A Popup will appear.

Reference screenshot


Step-7 Fill the required fields Like below

Call Back URL > You can't change this.
Token Name (As per your requirement)
Auth URL

https://login.windows.net/YourTenant.com/oauth2/authorize?resource=https://EnvironmentURL.operations.dynamics.com

Access Token URL
https://login.windows.net/YourTenant.com/oauth2/token?resource=https://EnvironmentURL.operations.dynamics.com

You can find the tenant from AX as well. Open D365FO Click on Setting icon. you can find the on top right of the screen then click on about.




Client ID > Application ID You Registered On Azure Portal
Secret Key > Enter the secret key you generate against your Azure Application.
If you don't provide secret key then a popup window will appear for login.


Reference Screenshot

Step-8 Click on Request Toke. Within 4 to 5 second you will get the Azure Authentication Token.

Step-9  Now select the Header value from the drop down and click on USE token to add this token in your request.

Reference screenshot


Step-10 Navigate to Header Tabs for the verification of Authorization token in your request

Reference screenshot

Step-11 Enter the Complete service URL and click on send. in my case I have called getFoo service.

Reference screenshot


Please check the above screen shot. You will find the success result 

Original post: http://d365technext.blogspot.com/2018/07/dynamics-365-finance-operation-webapi.html

No comments:

Post a Comment