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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
alchen00
Helper I
Helper I

EmbedURL Correct Syntax -- User Owns Data (Embed for Org)

I am using an Azure Token to call PBi API https://api.powerbi.com/v1.0/myorg/reports/{reportID}, as my setup is User Owns Data (Embed for Org).  I have received a 200 reponse with a JSON on report details as follow:
PBi Report.png
In the embedURL, I noticed that the URL I received is a lot longer than online samples, and contains an &config at the end (the string seems like a token but is a bit shorter than my Azure Token).

In my client-side JavaScript to embed my report (Step 5 in link below).  What is the correct embedURL should i use?  Is it to use the full string from my example above or use another way? 
https://learn.microsoft.com/en-us/power-bi/developer/embedded/embed-organization-app 

1 ACCEPTED SOLUTION
alchen00
Helper I
Helper I

I tested both ways below and it worked for me:

1) Add ReportID at the end of embedURL
The link below has a set of html codes for embedding power bi.  I have tried out the codes and it works.  I gather this is a short-hand way to write out powerbi.embed in powerbi-client    
https://torpedo.pt/power-bi-embedded/

embedUrl = "https://app.powerbi.com/reportEmbed?reportId=REPORT_ID";


2) Standard Way 

See Step 5 of the link below.   
https://learn.microsoft.com/en-us/power-bi/developer/embedded/embed-organization-app 

var embedUrl = "https://app.powerbi.com/reportEmbed";


Conclusion

To answer my own question from the earlier post.  Drop the "&config....." portion if you are using bootstrap and drop "?reportID......" if you are using the standard way. 

View solution in original post

1 REPLY 1
alchen00
Helper I
Helper I

I tested both ways below and it worked for me:

1) Add ReportID at the end of embedURL
The link below has a set of html codes for embedding power bi.  I have tried out the codes and it works.  I gather this is a short-hand way to write out powerbi.embed in powerbi-client    
https://torpedo.pt/power-bi-embedded/

embedUrl = "https://app.powerbi.com/reportEmbed?reportId=REPORT_ID";


2) Standard Way 

See Step 5 of the link below.   
https://learn.microsoft.com/en-us/power-bi/developer/embedded/embed-organization-app 

var embedUrl = "https://app.powerbi.com/reportEmbed";


Conclusion

To answer my own question from the earlier post.  Drop the "&config....." portion if you are using bootstrap and drop "?reportID......" if you are using the standard way. 

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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.