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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
l2aFa
Helper I
Helper I

Power BI Javascript API capabilities

Hi everyone

 

We are currently working on a web app that embeds power bi reports into an iframe filtered via the javascript API and its working like a charm.  However there are some features which we will like to add to our current solution such as:

  1. - Applying custom report themes (via the Javascript AP)I according to the account viewing the report.
  2. - Viewing the reports on mobile layout (accesing from our current web app, mobile app doesn't satisfy our requirements at the moment) either forcing to display the mobile layout via API or employing a responsive design.

After some digging, I couldn't find a satisfactory answer for any of these topics. The publish to web option isn't a viable option for security reasons and the javascript wiki doesn't mention anything about them either (or if it does I didn't find it).

 

Could anyone shed some light about these two?

 

Thanks in advance!

 

 

1 ACCEPTED SOLUTION


@l2aFa wrote:

Hello Eric

 

Thanks for answering :)!

 

We are not currently using Power BI Embedded, we obtain a token from the authentication service and then we embed the report into an existing iframe within the page. I considered creating multiple versions of the same report but due to the number of our clients is not a viable option. I will submit the idea though.

 

I'm gonna try with different resolutions in order to achieve something mobile friendly. In our case, we previously filter the report data via the javascript API so the client only has access to his own records. Going through the mobile app (as far as I know) will give any client access to the entire data unless we establish some RLS at the source (SSAS Tabular) but again our clients volume turns this option non-viable.

 

Thank you very much!


@l2aFa

You may don't have to offer each customer one theme, right? For me, I'd custom like ten themes and make a list to let the customers choose which would be prefered. By the way, you can find and download more themes here.

View solution in original post

4 REPLIES 4
Eric_Zhang
Employee
Employee


@l2aFa wrote:

Hi everyone

 

We are currently working on a web app that embeds power bi reports into an iframe filtered via the javascript API and its working like a charm.  However there are some features which we will like to add to our current solution such as:

  1. - Applying custom report themes (via the Javascript AP)I according to the account viewing the report.
  2. - Viewing the reports on mobile layout (accesing from our current web app, mobile app doesn't satisfy our requirements at the moment) either forcing to display the mobile layout via API or employing a responsive design.

After some digging, I couldn't find a satisfactory answer for any of these topics. The publish to web option isn't a viable option for security reasons and the javascript wiki doesn't mention anything about them either (or if it does I didn't find it). 

Could anyone shed some light about these two?


@l2aFa

Supposing you're using Power BI Embedded?

For Questions 1, AFAIK, it is not supported. As a workaround, you can import multiple pbixs with different themes(check how) and control which report to access for individual users in your application.

 

For Questions 2, my understanding is that the reports in Power BI service or Power BI Embedded are supposed to be viewed via the browers in a PC. For mobile device, just use the app Power BI mobile, though this app doesn't support Power BI Embeded.

You can submit your ideas at Power BI Ideas and vote it up.

Hello Eric

 

Thanks for answering :)!

 

We are not currently using Power BI Embedded, we obtain a token from the authentication service and then we embed the report into an existing iframe within the page. I considered creating multiple versions of the same report but due to the number of our clients is not a viable option. I will submit the idea though.

 

I'm gonna try with different resolutions in order to achieve something mobile friendly. In our case, we previously filter the report data via the javascript API so the client only has access to his own records. Going through the mobile app (as far as I know) will give any client access to the entire data unless we establish some RLS at the source (SSAS Tabular) but again our clients volume turns this option non-viable.

 

Thank you very much!


@l2aFa wrote:

Hello Eric

 

Thanks for answering :)!

 

We are not currently using Power BI Embedded, we obtain a token from the authentication service and then we embed the report into an existing iframe within the page. I considered creating multiple versions of the same report but due to the number of our clients is not a viable option. I will submit the idea though.

 

I'm gonna try with different resolutions in order to achieve something mobile friendly. In our case, we previously filter the report data via the javascript API so the client only has access to his own records. Going through the mobile app (as far as I know) will give any client access to the entire data unless we establish some RLS at the source (SSAS Tabular) but again our clients volume turns this option non-viable.

 

Thank you very much!


@l2aFa

You may don't have to offer each customer one theme, right? For me, I'd custom like ten themes and make a list to let the customers choose which would be prefered. By the way, you can find and download more themes here.

Hi again!

 

I hope we don't have to but who knows 😄 The idea was employing the same pbix with different themes (corporative colors of each client) avoiding multiple versions of the same report. 

 

The mobile test has been successful so far although report tabs are a bit tricky.

 

Thanks for the theme's gallery, I will have them in mind.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Kudoed Authors