Forum Discussion

leemoran's avatar
leemoran
Frequent Visitor
8 years ago

JavaScript API, Custom Layouts and SharePoint Online

Hi,

 

I am wondering if anyone has had any experience with embedding Power BI visuals in SharePoint Online using the JavaScript API?  I know there is a simple way to embed to SharePoint but I want to use the capabilities of the JavaScript API to apply some custom layouts and filters through to the SP web part.

 

A few things:

  • All viewers will be internal to the org
  • All viewers will be licenced with a Power BI Pro licence
  • We are aiming to have a few different reports that we intend to pluck out certain visual elements from and display in the web part

The main sticking point at the moment is around authenticating the user to get the necessary token.  We are having to piece together code elements from a number of different pages and it's not made any easier by some referencing the "old" Power BI Embedded workspace collection process and confusing things!

 

Does anyone have any experience doing this or is there any reference material online that I have missed?

 

Thanks in advance!

3 Replies

  • v-micsh-msft's avatar
    v-micsh-msft
    Microsoft Employee

    Power BI do have two options available to embed in SharePoint Online.

    1. Through SharePoint Online Embed option, take use of the iframe to embed the Publish to Web URL directly,

    2. Use the direct Power BI Icon

     

     

    I am not sure if using the Embed API directly would work, I will try to confirm that part with some SharePoint guys and update you later.

     

    Regards,

    Michael

    • azulcore's avatar
      azulcore
      Frequent Visitor

      Any updates? I would like to do the same but to add custom filters

    • kean's avatar
      kean
      Regular Visitor

      Hi, is there any update on this? I also need this for my project i'm working on. Thanks