Reputation: 149
I have trouble showing a power bi report in Power BI service suing a Python Web App. I got this error message:
Error Details:
400 Bad Request: Error while retrieving Embed token
Bad Request: {"error":{"code":"InvalidRequest","message":"Creating embed token for accessing dataset de376430-e631-4dbe-8722-2c9112f6e0ca requires effective identity to be provided"}}
RequestId: 052b6e05-8a39-408c-94d7-fe7091010d29
I have followed all steps in this article https://www.alphabold.com/power-bi-embedded-implementation-using-service-principal-and-python/ which is creating a Power BI embedded solution where I have created a Service principal service user, which I have put into a security group and this service principal is also an admin in the power bi workspace. I have tested this solution and a dummy report without dataset connection is showing up.
In the real test I have using a power bi report that has a dataset to an on prem SQL server database through a data gateway. The report itself is working inside the power bi service, but when I try to make it show up in the web app, the error message comes up.
So I think it must have something to do with the data gateway and the connection to the on prem dataset. I have heard somewhere that I need to add the data gateway user to the SQL database.
Upvotes: 0
Views: 1143
Reputation: 21
Just for your information, if you are using Django version >= 4.1, they have introduced SecurityMiddleware that disables third-party cookies. Consequently, you may encounter issues with the Power BI embedded iframe. I struggled with this.
To allow third-party cookies, you may need to configure SECURE_CROSS_ORIGIN_OPENER_POLICY in settings.
Upvotes: 1
Reputation: 397
This error can be caused by many different factors, such as:
Authentication Token is expired
Dataset doesn't support effective identity
Username wasn't provided
Role wasn't provided
DatasetId wasn't provided
User doesn't have the correct permissions
Try these steps to see which one it is:
Reference:
Upvotes: 1