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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
lilian7300
Frequent Visitor

How to get the correct authorization token

Hi 

 

I am trying to design a simple web app which can use power BI REST API to refresh a dataset.

But I stuck on how to get the authorization token from Azure Directory.

I tried to use POSTMAN and get a token but it return "401 unauthorize error" when I try to refresh the dataset.

POSTMAN.PNGPOSTMAN_refresh.PNG

But if I use the token I get from microsoft  try it link (Datasets - Refresh Dataset - REST API (Power BI Power BI REST APIs) | Microsoft Docs ), it works.

PBI_REST_API.PNG

 

 

Is there anybody here can help on how to get the correct authorization token?

 

Thanks

 

 

3 REPLIES 3
lilian7300
Frequent Visitor

Thanks for the replies but it still doesn't work, our company use DUO as a second authorization, is anybody have the experience for that?

 

 

V-lianl-msft
Community Support
Community Support

Hi @lilian7300 ,

 

Please refer to this blog:

https://dataveld.com/2020/05/09/using-postman-with-the-power-bi-rest-api/ 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

TedPattison
Microsoft Employee
Microsoft Employee

When you acquire an access token, you must request a permission scope of Dataset.ReadWrite.All.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.