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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Rakshana
Frequent Visitor

Filter power BI report in webapp using reportID

I have a web app. there is a power BI report embedded in it. whenever a user runs a report, a unique reportid is generated. The datasource is a sql db. I want to show the user the data for only that particular report id for their run. 

 

Currently the report shows all the data that's in the SQL db. the report id generated is also stored in the database. how can i put this filter on the report through SQL or power BI. It's a direct query report.

1 ACCEPTED SOLUTION
v-kpoloju-msft
Community Support
Community Support

Hi @Rakshana,

Thanks for the great question. What’s happening is that your embedded Power BI report is currently showing all the data, because it is not being filtered by the unique ReportID generated during a user’s run.

To solve this:

  • Make sure the ReportID column is included in your Power BI report (via DirectQuery).
  • In your web app, when embedding the report, pass a filter for that specific ReportID using Power BI's JavaScript API.
  • (Optional but recommended) For a more secure setup, use Power BI’s Row-Level Security (RLS) and pass the ReportID as a role-based identity using the embed token.

If you want to enforce security at the dataset level, consider implementing dynamic Row-Level Security (RLS) and passing the ReportID as an identity claim in the embed token using the GenerateToken API.

Kindly refer to the below mentioned documentation links for better understanding:
Use filters in a Power BI embedded analytics report | Microsoft Learn
Using standard cloud based row-level security with embedded content in Power BI embedded analytics -...

Hope this helps clarify things and let me know what you find after giving these steps a try happy to help you investigate this further.

Thank you for using the Microsoft Community Forum.

View solution in original post

2 REPLIES 2
v-kpoloju-msft
Community Support
Community Support

Hi @Rakshana,

Thanks for the great question. What’s happening is that your embedded Power BI report is currently showing all the data, because it is not being filtered by the unique ReportID generated during a user’s run.

To solve this:

  • Make sure the ReportID column is included in your Power BI report (via DirectQuery).
  • In your web app, when embedding the report, pass a filter for that specific ReportID using Power BI's JavaScript API.
  • (Optional but recommended) For a more secure setup, use Power BI’s Row-Level Security (RLS) and pass the ReportID as a role-based identity using the embed token.

If you want to enforce security at the dataset level, consider implementing dynamic Row-Level Security (RLS) and passing the ReportID as an identity claim in the embed token using the GenerateToken API.

Kindly refer to the below mentioned documentation links for better understanding:
Use filters in a Power BI embedded analytics report | Microsoft Learn
Using standard cloud based row-level security with embedded content in Power BI embedded analytics -...

Hope this helps clarify things and let me know what you find after giving these steps a try happy to help you investigate this further.

Thank you for using the Microsoft Community Forum.

thank you so much. we passed a filter parameter in the web app. It worked

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.