Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
mani1215
New Member

Forbidden 403 error for datasets/group through REST API (postman)

Hi Team,

 

I am creating oAuth token with below request payload and getting oAuth bearer token. When i use that token to list data sets, groups, add rows to dataset tables, we are getting the 403 Forbidden access. 

 

POST https://login.windows.net/common/oauth2/token

 

grant_type : client_credentials

resource: https://analysis.windows.net/powerbi/api

client_secret: XXXX

client_id: XXXX

 

This issue is blocking us to update data set tables data, do we have any documentation to get oAuth beare token from REST API (postman)

 

Thanks

Mani

2 REPLIES 2
Eric_Zhang
Microsoft Employee
Microsoft Employee


@mani1215 wrote:

Hi Team,

 

I am creating oAuth token with below request payload and getting oAuth bearer token. When i use that token to list data sets, groups, add rows to dataset tables, we are getting the 403 Forbidden access. 

 

POST https://login.windows.net/common/oauth2/token

 

grant_type : client_credentials

resource: https://analysis.windows.net/powerbi/api

client_secret: XXXX

client_id: XXXX

 

This issue is blocking us to update data set tables data, do we have any documentation to get oAuth beare token from REST API (postman)

 

Thanks

Mani


@mani1215

Based on my test, the token from grant_type "client-credentials" doesn't work. Try to use grant_type: password, the token works in my test.

Anonymous
Not applicable

@Eric_Zhang I am able to make it work with UserNamePassword Credential but unable to communicate with the Power BI service with clientCredential. Below is my code snippet. credential is of type UserPasswordCredential and creds is of type ClientCredential, instantiated with clientID and client secret.

 

Snippet

var authenticationContext = new AuthenticationContext("https://login.windows.net/common/oauth2/authorize/");
//var authenticationResult = await authenticationContext.AcquireTokenAsync("https://analysis.windows.net/powerbi/api", clientId, credential);
var authenticationResult = await authenticationContext.AcquireTokenAsync("https://analysis.windows.net/powerbi/api", creds);

 We would like to use the ClientCredential just to make sure we don't have to update the password every 3 months(governed by policies)

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.