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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
LP280388
Resolver II
Resolver II

Report URL with Parameters in Teams notification

Hi team, 

 

we have recently encountered an issue with Teams notification when we integrate Teams with PowerBI application.  The issue is, the report link sent from Teams notification is not embedding the filters along with the link and making the report show incorrect data for the managers. 

 

is there a way to embed the filter value in the teams notification

or

how do we filter for current logged in person when he comes from teams notification?

 

 

 

Some considerations/ background of the report are as below :

  1. This report is designed in such a way to show one persons data at a time.
  2. Users logs into this report from many different ways like
    1. from Powerapps
    2. from another powerbi report
    3. from another internal application
    4. In all these ways, we are embeded the report URL with parameters to filter for the logged in user 
  3. The same report is used to view Team member's data as well by embedding a person's employee id which is done by using another button in the report which makes the manager log into the same report but filtering for another person in his team.
  4. The URL of the embeded report look something as below : 
    1. app.powerbi.com/groups/..................../datasets/.................................../ReportSection............................&filter=table%2FEmpID%20eq%20%27"EmpID"%27
  5. the URL of the report link sent via teams notification is 
    1. app.powerbi.com/groups/..................../datasets/...................................     ---- This is no filtering happening here.

 

 

4 REPLIES 4
Jonvoge
Super User
Super User

Hi LP280388

 

I believe the correct solution to this is not URL Parameters, but rather Row Level Security.

As your users are logged in when they access the report in both Teams and Power BI Service, we can in Power BI return their User ID with the DAX formula USERPRINCIPALNAME() - Or just USERNAME() if you want it without the email suffix.

 

You can use this in a Security Rule, in which you filter your [EMP ID] by the USERPRINCIPALNAME() to dynamically filter your report based on the user logged in.

 

Here's a good guide: Dynamic Row Level Security with Power BI Made Simple - RADACAD



_____________________________________________________
I hope my comment was helpful.
If your question was answered, please mark your post as 'Solved' and consider giving me a 'Thumbs Up'.
Find me on LinkedIn, Sessionize, or my blog Downhill Data

@Jonvoge , thanks for responding. Yes it is indeed the RLS which is filtering for Manager and his directs too in the same report. Since we can duplicate the same report to seperate the managers and his directs we are leveraging one report and parameters to filter the data. 

 

Is there a possibility to do the below :

1. when a user logs into the report - "without URL parameters " then it should filter for himself.

2. When the user logs into the report - "with URL parameters" then it should filter for the person embedded in the url

 

Anonymous
Not applicable

Hi @LP280388 

 

Here's an idea for your reference:

First of all, create roles in Power BI Desktop that define the filtering logic. For example:

[EmpID] = IF(
    ISFILTERED('YourTable'[EmpID]) && SELECTEDVALUE('YourTable'[EmpID]) <> BLANK(),
    SELECTEDVALUE('YourTable'[EmpID]),
    USERPRINCIPALNAME()
)

Then set up url parameters, and ensure that the URLs sent in Teams notifications include the necessary parameters to filter the data. For example:

app.powerbi.com/groups/.../datasets/.../ReportSection?filter=YourTable/EmpID eq 'PARAM_EMP_ID'

Next, handle filtering in Power BI, use DAX to detect whether a URL parameter is present. You can create a calculated column or measure to check if the EmpID filter is applied.

FilteredEmpID = 
IF(
    ISFILTERED('YourTable'[EmpID]),
    SELECTEDVALUE('YourTable'[EmpID]),
    USERPRINCIPALNAME()
)

When setting up the Teams notification, ensure the URL includes the filter parameter if you want to filter for another user. If no parameter is included, the RLS will apply and filter for the logged-in user.

 

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@Anonymous , I get the error that userprinciple cant be used in calculated column for the below. If i create a measure, im unable to use it in the "Filter all page". Is there any other way ?

Since i have multiple visuals in the canvas and multiple pages of same showing other info of the same employee, I have to apply this filter at "Filter on all pages"

 

 

FilteredEmpID = 
IF(
    ISFILTERED('YourTable'[EmpID]),
    SELECTEDVALUE('YourTable'[EmpID]),
    USERPRINCIPALNAME()
)

Thanks for your reply. 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Kudoed Authors