steps to create PowerBI API token

247 Views Asked by At

i'm using this URL https://login.windows.net/(the Tenant ID of the App that i made in Azure AD)/oauth2/token to create a Token for PowerBI API. my postman looks like this:

enter image description here

but when i use this Access token to do some operations like getting a list of reports in a Dataset i get 401 Unauthorized:

enter image description here

exactly which steps i have taken so far can be seen in this Question. I also haven't created a Service Principal, is that needed here? Am i missing a step?

1

There are 1 best solutions below

1
On

I tried to follow all the steps, it's working fine for me.

Please check the API permissions provided for your registered app. You can check the required permission API Permissions -> Add a permission -> Power BI Service and select the required permission.

For Instance, We need these permissions to access the datasets:

permissions required to access the datasets

You can also try the same with the 'try it' feature from here:

Datasets - Get Dataset In Group - REST API (Power BI Power BI REST APIs) | Microsoft Docs