Postman is one of the most widely used tools available for developing and testing APIs. Today we will see how we can use Postman to call Microsoft Dataverse API. Let’s get started. Let’s get started.
First step is to register an app in Azure Active Directory for Common Data Service as explained in our earlier article.
After creating the Application user We will also need to add the platform configuration for desktop application:
Next we will add native client URL from Microsoft in the redirect URIs section:
After this navigate to Manifest tab and change AllowImplicitFlow to True.
Now open Postman software if you have already installed on your machine. If not download it from here. We will now create an environment in Postman by clicking ‘Manage Environments’ in the top right corner.
Click on ‘Add’ button:
Here we will add the environment and the following variables.
url should be the crm url of your org.
clientid the clientid of your application.
Version is your crm web api version.
Callback is your callback url which is the native client url as added in the Platform configurations above.
Authurl can be get by clicking endpoints
From here we can get Oauth 2.0 authorization endpoint.
Now, we will select our environment and start creating the new request by clicking the plus button. Click authorization tab. In this tab, select Type as ‘OAuth 2.0’
And now configure a new token with the following properties:
When we click on ‘Get New Access Token’, we will get Authentication complete:
We can proceed and click ‘Use Token’:
Now, when we run an API request like WhoAmI as shown in the figure below.
We will get the following response:
Now, we should be able to test all the API methods from postman without writing any code.
For questions or insights, leave a comment below or reach out to us at info@optimallogics.com. We are always happy to help.