Hi,
I've created a report and I want to embed it into a SPA web application for our customers (external users).
For testing, I've used the NodeJS code from here: https://github.com/microsoft/PowerBI-Developer-Samples
Followed this tutorial: https://docs.microsoft.com/en-us/power-bi/developer/embedded/embed-sample-for-customers?tabs=net-core
I could embed my report using the master user authentication but I couldn't with using the service principle.
Here is what I have done so far:
- Created a service principle
- Service principle has added to a security group
- Created an Azure app with API permissions (everything from Delegated permissions) and Client secret
- Enabled the service principle in Power BI at the admin portal.
- Data gateway created
- I have a workspace and I've added the service principal and the security group as admin
- Configured the NodeJS sample from the link above (I didn't change the code just set the configuration)
But I still getting this error message
Error Details:
Error while retrieving report embed details
Unauthorized
As I already mentioned the master user auth mode is working properly. So, I clearly missed something for the service principle but I couldn't figure out what.
Please let me know if you need more information.