Getting Started with the Dataverse API in Postman

This entry fills in the gaps of Microsoft’s official documentation as I had to go through a fair amount of trial and error to get things going. It assumes general familiarity with APIs, Postman, Azure, and Dataverse, this is not an ELI5/101 type of post but rather a list of things that I had to google to resolve, so that you don’t have to waste 45 minutes to perform what should be a 10-minute bootstrap.

Essential for troubleshooting
  1. Start from Use Postman with the Web API and set up your environment as explained, but don’t use their default values, do register an app in Azure.
  2. When you register your app in the Azure portal under Azure Active Directory, make sure you allow tokens for implicit flows, otherwise you’ll get the “response_type ‘token’ is not enabled for the application” error.
  3. To find the * URL for your environment, go to the Advanced Settings at (from the cogwheel in the top navbar).
  4. The redirect URL doesn’t really matter but I think it does need to resolve. I just use one of my own domain names.
  5. When you generate your token in Postman, add authorization data to Request Headers and not the default Request URL, otherwise your API calls will return 401 unauthorized.
  6. Make sure to set up additional HTTP headers in Postman as shown here.
  7. Get the basic WhoAmI call to work before moving on to other API calls to establish that your environment and token are all set up properly. If it doesn’t work, make sure to review what the Postman console spits out.
  8. If you’re trying to query a custom entity, you need to use its prefix and its plural form, otherwise you’ll get an error: “Resource not found for the segment ‘your_misspelledcustomentity’.”

That covers the main hiccups I had to troubleshoot before I could make a successful API call against a custom entity, I hope this helps and good luck!

Leave a Reply

Your email address will not be published.