Forum Discussion
scenario of using Power BI API for embedding
1. in which schenario we should use Power API for embedding rather than using embed code for embedding (basic embedding or secure embedding)?
2. can i render slicers and filters selections in embbeded code if i use basic embedding?
From what I have seen embed code the main pointers would be for it to be used if your filter is static and is simply for public sharing without security concern where as you have alot more control with Power BI REST API embedding including granular control for slicers and filters.
Reference:
https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/control-report-filters
https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-url-filters
https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/control-report-slicers
6 Replies
- MohamedFowzan1
Super User
From what I have seen embed code the main pointers would be for it to be used if your filter is static and is simply for public sharing without security concern where as you have alot more control with Power BI REST API embedding including granular control for slicers and filters.
Reference:
https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/control-report-filters
https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-url-filters
https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/control-report-slicers
- v-saisrao-msft
Community Support
Hi powerbiexpert22,
Have you had a chance to review the solution we shared earlier? If the issue persists, feel free to reply so we can help further.
Thank you.
- Shahid12523
Community Champion
1.Use Power BI API embedding when you need security, RLS, custom authentication, dynamic filters/slicers, events, or multi-tenant apps. Embed code is only for simple public or internal secure reports.
2.Basic embedding (Publish to Web) → ❌ can’t pre-set slicers/filters.
Power BI API embedding → ✅ you can control slicers/filters programmatically. - v-saisrao-msft
Community Support
Hi powerbiexpert22,
Have you had a chance to review the solution we shared by Shahid12523 MohamedFowzan1 ? If the issue persists, feel free to reply so we can help further.
Below are the links for your reference regarding the issue.
Power BI usage scenarios - Power BI | Microsoft Learn
Power BI usage scenarios: Embed for your customers - Power BI | Microsoft Learn
Power BI embedded analytics overview - Power BI | Microsoft Learn
Thank you.
- v-saisrao-msft
Community Support
Hi powerbiexpert22,
Checking in to see if your issue has been resolved. let us know if you still need any assistance.
Thank you.
- v-saisrao-msft
Community Support
Hi powerbiexpert22,
We haven’t heard back from you in a while regarding your issue. let us know if your issue has been resolved or if you still require support.
Thank you.