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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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