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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.