How to make a proper OAuth request to Dataverse API with Postman?

Mark Farkas 0 Reputation points
2023-02-24T17:02:33.3766667+00:00

I want to make an OAth request to the Microsoft Dataverse API to get the Bearer token, and with this token I wish to make authenticated requests to PowerAutomate. I use Postman for making the requests. I can get the Bearer token in 2 different ways, but with the same result after using these in a request: 401 Unauthorized

My settings:

Common auth url:

common_token

Auth url with TenantID:

tenant_id_token

As you can see I got a Bearer token for both, but when I try to call the simplest /WhoAmI endpoint I got 401 Unathorized error.

I have my API permissions set up properly in the Azure app:

api_permissions

I have my application user with the right application ID:

application_user

My first question: What am I missing? What else should I set up?

My second question: What is the difference between the two auth endpoint I am using?

Any suggestions are welcomed.

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,798 questions
{count} votes