D365 FO - Data Entity (Azure AD & Postman Access Token)
Problem Statement:
How to get the D365FO Access Token via POSTMAN.
Steps:
- visit https://portal.azure.com/ (For Active Directory Authentication)
- Go to Azure Active Directory >> App Registration >> New Registrations >> Fill the Following Details.
- After Complete the Registration following details will display in the registration section.
- Open the POSTMAN.
Collection >> New Collection >> Add Request.(Get Token is a Request name.) - Use the following URI in the "GET" method.
"https://login.microsoftonline.com/{TenantID}.
Note : Tenant ID :- Taken this ID from the Azure registration section. - POSTMAN Body section.
Body >> Form-data >> enter the following key-values.
- Access Token will generate after hit the Send button.
- After getting the access token, we need to map the client id via D365FO front end.
D365FO >> System Administration >> Setup >> Azure Active Directory Applications.
>>New/Edit >> {Client Id} >> and Map the "admin user" under the "User_ID" Section and click the Save button. - If you want to get the list of OData entity is available in the D365FO, you need to type the following URL in the browser.
"https://D365FOURL/data"
data.json file automatically downloaded. - Open the file and search your custom entity is available in the Json file.
- After found your custom entity name and type the following URL in the browser again.
"https://D365FOURL/data/{CustomEntityName}"
customentity.json file automatically downloaded, Save and open the file. - File has contain the List of all the data against the entity.
Another Way for Access the D365FO Data: - We can access the same data via POST Man also.
- Open the POSTMAN.
Add Request.(Get the entity value as a Request name.) >> Get Method >>"https://D365FOURL/data/{CustomEntityName}" - Header >> "Content-Type" as a Key and "application/json" as a value.
- authorization >> Type >> Bearer Token >> Token >> "Copy the Access token value form the Step # 8 and paste it here".
- Hit the send button from postman.
- List of all the data against the entity.
Note : Some scenario need to disable the "SSL Certificate". - If you want to Insert / Update. Needs to pass the JSON in the Body section and change the Method as "POST" and hit the send button.
- Based on your value records are insert or updated in the system.
Comments
Post a Comment