Postman is an API platform for developers to design, build, test, and iterate their APIs.
In this article, I will explain the setup and connect to the Dataverse environment in Postman.
Follow the below steps.
Pre-requisite
How to Download and Install Postman on your PC?
Step 1
Launch Postman on your Desktop.
Step 2
Click on Create Account to create a new account in Postman.
or
Click on Sign In, if you already have an account.
Note: This Sign In is only required to store all your activity in your Postman account online. Otherwise, all your work will be stored locally on your PC.
I already have an account, so clicked on Sign In and it will be redirected to a web browser page.
Step 3
Provide Email or Username and Password and Click on Sign in.
Step 4
Click on Open to open the Postman Desktop App.
Postman Desktop app opening is in progress.
Postman Desktop app opened with the credentials provided in Step 3.
Step 5
Click on Workspaces and Click on Create Workspace.
Step 6
Provide Name, Summary and choose the required Visibility.
Click on Create Workspace.
Workspace has been created.
Step 7
Click on Environments.
Step 8
Click on Create Environment.
Step 9
Provide the Environment Name.
Step 10
Provide the below variable names.
Note:
- clientid for the Development environment you can provide 51f81489-12ee-4a9e-aaae-a2591f45987d and for other environments you can get the client id from the below article.
How to Register an App in Azure Active Directory for Dynamics 365 CE Online?
- url and version of the webapi of the Dynamics 365 CE environment can get from the below article.
How to get the Dataverse Web API endpoint details in the Microsoft PowerApps?
Step 11
Variables will look like the below. Click on Save.
Step 12
Click on Collections.
Step 13
Click on Create Collection.
Step 14
New Collection will be created and click on … and Click on Rename to change the Name of the Collection.
You can Enter Documentation for the Collection in the Documentation Section.
Also, make sure to select the right Environment on the Top right-hand corner in the Environments dropdown.
Step 15
Provide the name to the New Collection.
Step 16
Under Authorization, select Type as OAuth 2.0.
Type will be set to OAuth 2.0 and Add auth data to Request Headers.
Step 17
Provide the below values under the Configure New Token section.
Token Name |
Give some name to the Token |
Grant Type |
Choose Implicit |
Callback URL |
{{callback}} |
Auth URL |
{{authurl}} |
Client ID |
{{clientid}} |
Step 18
Click on Save.
Step 19
Click on Get New Access Token to generate token.
Step 20
Sign in page will be prompted. Provide your Dynamics 365 Environment's Email address and click on Next.
Step 21
Provide your password and click on Sign in.
Step 22
Open the Microsoft Authenticator app for approving the request.
Once the credentials are successfully verified, you can see the below message “Authentication complete“.
Step 23
Access Token is generated and Click on Use Token.
Access Token can be seen under Current Token section.
Step 24
Under Collections, click on Add a request to test our connection.
Step 25
Click on New Request … and Click on Rename.
Renamed to WhoAmI.
Step 26
Select GET Http Verb and provide the below text
{{webapiurl}}WhoAmI
and click on Save and Send.
WhoAmI GET request sending is in progress.
Once, the connection is established successfully you can see the below response under Body section.
Hope you have followed all the steps and connected to your Dataverse environment in Postman.
Like and share your valuable feedback on this article.