D365 FO - Data Entity (Azure AD & Postman Access Token)

 Problem Statement: 

            How to get the D365FO Access Token via POSTMAN.


Steps: 

    1. visit https://portal.azure.com/ (For Active Directory Authentication) 
    2. Go to Azure Active Directory >> App Registration >>  New Registrations >> Fill the Following Details.
    3. After Complete the Registration following details will display in the registration section.


    4. Go to the "Certificates & Secrets" >> New Client Secrets. Refer the below attachment.


    5. Open the POSTMAN.
      Collection >> New Collection >> Add Request.(Get Token is a Request name.)
    6. Use the following URI in the "GET" method.
      "https://login.microsoftonline.com/{TenantID}.
      Note : Tenant ID :- Taken this ID from the Azure registration section.  
    7. POSTMAN Body section.
       Body >> Form-data >> enter the following key-values.
            

    8. Access Token will generate after hit the Send button.


    9. 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.



    10. 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.
    11. Open the file and search your custom entity is available in the Json file.
    12. 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.
    13. File has contain the List of all the data against the entity.

      Another Way for Access the D365FO Data:

    14. We can access the same data via POST Man also.
    15. Open the POSTMAN.
      Add Request.(Get the entity value as a Request name.) >> Get Method >>"https://D365FOURL/data/{CustomEntityName}" 
    16. Header >> "Content-Type" as a Key and "application/json" as a value.
    17. authorization >> Type >> Bearer Token >> Token >> "Copy  the Access token value form the Step # 8 and paste it here".
    18. Hit the send button from postman.
    19. List of all the data against the entity.
      Note : Some scenario need to disable the "SSL Certificate".
    20. 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.
    21. Based on your value records are insert or updated in the system.

Comments

Popular posts from this blog

DMF (1073676279) - Issue Fix

Read the JSON data via REST API (X++)

Activate Financial Dimension in Dynamics 365 FO. (On- Premises)