- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
embed power-bi - getting 401 Unauthorized: Error while retrieving Embed URL
Hello,
I am trying to use power-bi report in python example app, but I am getting
Error Details:
401 Unauthorized: Error while retrieving Embed URL
Unauthorized:
RequestId: XXXXX
I followed this tutorial https://docs.microsoft.com/en-us/power-bi/developer/embedded/embed-sample-for-customers?tabs=python and other power-bi tutorials, i also changed different configurations in power-bi and AD apps but it didn't resolve the problem.
Also, when I used power-bi rest APIs via postman, I was able to generate a valid token without RLS.
https://api.powerbi.com/v1.0/myorg/groups/XXX/reports/YYY/generatetoken
Can you please help to resolve the issue?
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, did you find a way to solve the issue? I have the same error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @alteco ,
Do you add the registered app in ADD (service principal) to a security group, and then add it in Power BI Admin Portal?
If not, try this to see if the problem persists
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Yes, I already did it and it didn't solve the problem.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you must add the service principal with proper permissions and add it to the workspace as the role you wish and then you must embedd the report by passing the tenant id , client secret for authenticating purpose and group_id and report id to specify the report .The group id must be the workspace id where you have added the service principal.For RLS you must pass the role to get authenticated.
Best Regards,
Kandeebaraj G
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources
User | Count |
---|---|
12 | |
11 | |
3 | |
3 | |
2 |