Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
ptrlv
New Member

power bi embedded

Hi,

 

I'm trying to use power bi embedded but going through access issues.

 

I mananged to create the workspace and upload a sample report via powerbi-cli. I'm also generating the access token with 'powerbi create-embed-token'

 

The token seems to be valid. Below is the decoded version (from https://jwt.io/)

{
"ver": "0.2.0",
"aud": "https://analysis.windows.net/powerbi/api",
"iss": "Power BI Node SDK",
"type": "embed",
"wcn": "ProfilingOnline",
"wid": "0a29a0e2-5879-4be1-b11a-a1e16d0b7734",
"rid": "bc9204c4-52c3-40b0-b764-9cc54e2b16a7",
"nbf": 1496958040,
"exp": 1496961640
}

 

But when I test it on https://microsoft.github.io/PowerBI-JavaScript/demo/code-demo/index.html# I keep on getting not authorised.

 

Any ideas?

Thanks

 

 

 

1 ACCEPTED SOLUTION

Hi,

 

The problem was in the token, it was not signed correctly. It's working perfectly now.

 

Thanks a lot for your help

Regards

View solution in original post

2 REPLIES 2
Eric_Zhang
Microsoft Employee
Microsoft Employee


@ptrlv wrote:

Hi,

 

I'm trying to use power bi embedded but going through access issues.

 

I mananged to create the workspace and upload a sample report via powerbi-cli. I'm also generating the access token with 'powerbi create-embed-token'

 

The token seems to be valid. Below is the decoded version (from https://jwt.io/)

{
"ver": "0.2.0",
"aud": "https://analysis.windows.net/powerbi/api",
"iss": "Power BI Node SDK",
"type": "embed",
"wcn": "ProfilingOnline",
"wid": "0a29a0e2-5879-4be1-b11a-a1e16d0b7734",
"rid": "bc9204c4-52c3-40b0-b764-9cc54e2b16a7",
"nbf": 1496958040,
"exp": 1496961640
}

 

But when I test it on https://microsoft.github.io/PowerBI-JavaScript/demo/code-demo/index.html# I keep on getting not authorised.

 

Any ideas?

Thanks

 

 

 


@ptrlv

The decoded token looks good and the demo site works fine when I testing my own reports. Two things to confirm.

  1. Ensure the workspaceid(wid) is the correct workspace where the report you'd like to embed is uploaded to.
  2. Is there any RLS setting in that report?

Hi,

 

The problem was in the token, it was not signed correctly. It's working perfectly now.

 

Thanks a lot for your help

Regards

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.