Reputation: 110
As the title suggests, I've been trying to setup a PowerBI Embed solution using this guide here. I've managed to use the PowerBI REST API to get all the information I need (report id, access token and embed token). But for this I need an authentication token to send on the Authorization header of the request.
My question is, is there a way to use Service Principal and obtain the Authorization token that way? I've found this exact solution here for Python and .NET, but I'm more interested in using React only for this.
Upvotes: 0
Views: 1018
Reputation: 555
This was a problem I once encountered. Generally, you can get a token using msal.js or adal.js, but you need to access the report first. To create a new inclusion token, you must create a token via Azure AD on the backend of your app.
Upvotes: 1
Reputation: 169
You shouldn't generate embed tokens on the client side as it is not secured. Your solution should have a server side (Python/.NET/Java/Node.js) where you generate the embed tokens using service principal and pass it to the client side.
Upvotes: 2