Forum Discussion
Error while executing Get dataset call "API is not accessible for application"
- 6 years ago
I was able to find the reason why. This was because I was trying to work on the data form My Org and this is a limitation in the Service Principal method:
Considerations and limitations
- Service principal only works with new workspaces.
My Workspace isn't supported when using service principal.
I am sorted now thanks for teh help.
Hi vivinj ,
First of all, Postman is just a tool and doesn't require specific permissions in order to use to Power BI API.
I think your Authorization token was generated with some restrictions.
When you registered an App, did you select all options?
For one time you can get an Authorization token with full rights simply via Chrome Developer Tools (F12) or other similar:
1. Open Power BI Service in Chrome Browser.
2. Press F12. DevTools window should appear.
3. Navigate in Power BI Service to any workspace. (If you were there, then redo, just need to run this action)
4. Go to DevTools -> Network tab , try to find any request, where Headers contain authorization. And that will be your Authorization token (valid for an hour).
On the screen shot below I found a request called 'SharedDatasets'. But for instance, 'subsribe' also a good one.
So I got a token, then I go to Postman and everythin works properly:
So I recommend to try to run your request using a method I provided, just to verify if your API request is written properly. And then if that works you can correct an App in Azure with proper permissions.
Regards,
Ruslan Zolotukhin (zoloturu)
BI Engineer at Akvelon Inc. / Kharkiv Power BI User Group Leader / DAX & Power BI Trainer
-------------------------------------------------------------------
Did I answer your question? Mark my post as a solution!
It was useful? Press Thumbs Up!
You are from Ukraine? If yes then welcome to Power BI User Group - KhPUG website. Other country? Check and find proper one - Power BI User Groups