Generate a Power BI Embed Token

Last Saturday a friend of mine called me and he asked, how can generate a Power BI Embed Token. He want to test the embedding on the Power BI Playground (https://microsoft.github.io/PowerBI-JavaScript/demo/v2-demo/index.html).

I said, that’s easy. Follow the instructions of “Guy in a Cube” – he explained that on a YouTube Video: https://www.youtube.com/watch?v=4KuyPNtVijo&t=319s

After 30 minutes he called me again, he struggled on the Power Shell execution …

Okay, long story short. To run the script successfully, you must do this steps:

  1. Run the PowerShell ISE as an Admin
  2. Execute following script to install the Power BI Cmdlet:
    Install-Module -Name PowerBIPS
  3. Edit the URL from the PowerShell Script sample

1. Navigate to your report on PowerBI.com

1: Your workspace ID

2: Your Report ID

Go to your PowerShell Script, In the video it seems so easy, only replace the workspace id … it’s not ;-) Edit the URL

  • Don’t use the URL from the Playground, use the one from the PowerShell Script. Replace the workspace and the report ID.
  1. Run the script and paste the Embed Token, the Report ID and grab the Embed URL from the Playground. Replace the Report ID and the Workspace (Group) ID

Done. Weekend!


Categorized: Allgemein

Schreibe einen Kommentar