Thursday, December 29, 2022

Setup Postman step by step for API Requests

 Setup Postman step-by-step for API Requests

Postman is one of the popular tools that allow us to authenticate to Microsoft Dataverse instances and compose and send Web API requests and view responses.

We can use Postman to perform ad hoc queries or to verify the behavior of operations without writing a program.

setup postman:

1. Launch and log in to Postman Desktop App or login using the browser app using your credentials
    if don't have an account create one personal account and log in. I have logged in using my Gmail account. Postman Login

2. Create a new workspace:


3. Navigate to Collections -> Create a new collection:



4. Rename the collection and -> select Add request option to create a new API request.

5. Generate a token and use it to call API requests. Navigate to the header and fill details as shown:



6. Navigate to Authorization and select type as OAuth2.0 and Add authorization data to the Request Header



7. Steps to Configure New Token:




Token Name:                      TCC Token
Grant Type:                         Client Credentials
Access Token URL:            https://login.microsoftonline.com/dec27b8f-0c94-4d69-be56-a70a818d9b55/oauth2/token?
                                            Get the access token from Azure Portal -> App registration-> Enpoints:
  



Client ID:                        276d50f7-cd3c-400b-bd80-0beff8b4690d

                                        Get Client ID from Azure Portal -> App Registrations -> Select and Open the app user (Query Audit Logs) My App user name



Client Secret:                        JMJ7Q~xrUEhpTLhLy_fWm8LoEfTar_bplCEz3
                                              Get the Client Secrets from the Application user -> App Registration -> Open the Application user-> Navigate to Certificate & Secrets -> Copy the value



Client Authentication:                        Send ad Basic Auth header

8. Navigate to Advanced Option and fill in Resources -> Get New Access Token:


9. Click Proceed:


10. Click Use Token:



11. The Current Token will gets added as shown:



12. Navigate to Body -> Select row -> and pass JSON value as shown:



13. Navigate to the Header URL and add a Post Request as shown -> Click on Send button:



14. The Response can be seen as shown below:


Reference: Setup Postman



No comments:

Post a Comment