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.
- 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.
- 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.
- To find the *.crm.dynamics.com URL for your environment, go to the Advanced Settings at make.powerapps.com (from the cogwheel in the top navbar).
- The redirect URL doesn’t really matter but I think it does need to resolve. I just use one of my own domain names.
- 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.
- Make sure to set up additional HTTP headers in Postman as shown here.
- 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.
- 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!