Forum Discussion
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.
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.
Is there anybody here can help on how to get the correct authorization token?
Thanks
3 Replies
- TedPattisonMicrosoft Employee
When you acquire an access token, you must request a permission scope of Dataset.ReadWrite.All.
- V-lianl-msftCommunity 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. - lilian7300Frequent 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?