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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
AI1995
Frequent Visitor

Logging on data level (after Row Level Security)

Hi all,

I have implemented row level security on my reports and I would like to log these (filter) actions for audit reasons. The situation:

 

Alice views a report being signed in with her email.

Row level security filters out what Alice is allowed to see based on her email using USERPRINCIPALNAME() and an "autorisation"  tabel which has a relation with the data.

 

I want to log the query (and email & datetime) which provides the data Alice will see. Is there a way to get this information?

Greetings!

 

2 REPLIES 2
MAwwad
Solution Sage
Solution Sage

 
= VAR CurrentUser = USERPRINCIPALNAME() VAR CurrentFilter = [RLS Filter Measure] INSERT INTO LogTable (Email, Query, Timestamp) VALUES (CurrentUser, CurrentFilter, NOW())
 

This approach will allow you to log the query used by the RLS filter, as well as the email and date and time of access, for each time the report is accessed.

AI1995
Frequent Visitor

Hi DataSlayer,

thanks for the response, I believe this is exactly what I need. However I do not know how and where to implement this expression. Cloud you show me? 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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