Set up a Postman environment
To save you time and get you started right away, this article describes how to configure and use a Postman environment to work for your Dataverse environments without you having to register your own Azure Active Directory (Azure AD) application. For information on Postman environment and variables, see Postman Documentation > Variables.
Prerequisites
- Have a Power Apps Dataverse environment that you can connect to.
- Download and install the Postman desktop application.
- Have a Postman account Postman Sign up.
Connect with your Dataverse environment
Important
To save you time and get you started right away, we have provided a Client ID for an application that is registered for all Dataverse environments, so you don't have to register your own Azure Active Directory (Azure AD) application to connect with Dataverse API.
Launch the Postman desktop application.
To create a new environment, select Environments on the left and click +.
Enter a name for your environment, for example, MyNewEnvironment.
Sign into Power Apps to get the base url of the Web API endpoint.
Select your Power Apps environment and then click the Settings button in the top-right corner. Then click Developer resources.
In the Developer resources pane, retrieve the base url of the Web API endpoint.
In Postman, add the following key-value pairs into the editing space and use initial value for current value.
VARIABLE INITIAL VALUE ACTION url
https://<your org name>.api.crm.dynamics.com
Use the base url of the Web API endpoint clientid
51f81489-12ee-4a9e-aaae-a2591f45987d
Copy the value version
9.2
Copy the value webapiurl
{{url}}/api/data/v{{version}}/
Copy the value callback
https://localhost
Copy the value authurl
https://login.microsoftonline.com/common/oauth2/authorize?resource={{url}}
Copy the value Your settings should appear something like below:
Click Save to save your newly created environment named MyNewEnvironment.
With your newly created environment selected, set it as the active one by either:
- Clicking the ellipses menu near the top-right and selecting Set as active environment, or
- Clicking the environment dropdown in the top-right and selecting MyNewEnvironment".
Generate an access token to use with your environment
To connect using OAuth 2.0, you must have an access token. Use the following steps to get a new access token:
Make sure the newly created environment MyNewEnvironment is selected. Click + right next to MyNewEnvironment.
The following pane appears. Select the Authorization tab.
Set the Type to OAuth 2.0 and set Add authorization data to to Request Headers.
In the Configure New Token pane, set the following values:
Name Value Action Grant Type implicit Choose implicit from the drop-down Callback URL {{callback}}
Copy the value Auth URL {{authurl}}
Copy the value Client ID {{clientid}}
Copy the value Your settings should appear something like below:
Note
If you are configuring environments in Postman for multiple Dataverse instances using different user credentials, click Clear cookies to delete the cookies cached by Postman.
Click Get New Access Token.
Once you click Get New Access Token, an Azure Active Directory sign-in dialog box appears. Enter your username and password, and then click Sign In. Once authentication completes, the following dialogue appears.
After the authentication dialogue automatically closes in a few seconds, the Manage Access Tokens pane appears. Click Use Token.
The newly generated token will automatically appear in the text box below the Available Tokens drop-down.
Test your connection
The following shows how to test your connection using WhoAmI:
Select
GET
as the HTTP method and add{{webapiurl}}WhoAmI
in the editing space.Click Send to send this request.
If your request is successful, you will see the data returning from the
WhoAmI
endpoint, like below:
Next steps
Learn about using Postman to perform operations with the Web API.
See also
Use Postman to perform operations
Walkthrough: Register a Dataverse app with Azure Active Directory
Feedback
Submit and view feedback for