Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon'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.
How can we implement the RLS, so that the users linked with the particular guid lets say 1001, can see each others report when filtered with the RLS email address, and the users belonging to the company id 1002 do not see the details of 1001 company id when they loged in??
Solved! Go to Solution.
Hi @Anmolgan,
It works same as username.
You can use username function to find out user, then use user to find related company.
In RLS expression, you can use above company id as filter parameter to apply security filter effect.
Logic:
1. Username -> user id.
2. User id -> company
3. User id and company id as filter condition.
If you still not clear for this, you can share some sample data and I will add these expression to your sample.
Regards,
Xiaoxin Sheng
Hi @Anmolgan,
I think you need to create/add guid to user email table to achieve email - guid mapping.
After these steps, you can refer to below link to know how to create dynamic RLS based on username function.
Notice: please remember to turn on the 'apply security filter in both directions' option at edit relationship panel.
Regards,
Xiaoxin Sheng
Can you explain this in depth as I want to user [user table]= username() here and also the [comapnyid]= "value provided by the user" if user a b belongs to comapny 1001 and c belongs to 1002, then if user a logs in then he should also be able to see the user b's data, how can I achive this scenerio??
The links which you have only talks about the username() function, and dynamic row level security, I was able to create the below relationship and using the Company[COMPANYID] to sort but how to sort all this together with email? so that all the users belonging to 1001 group id can see each others report??
Hi @Anmolgan,
It works same as username.
You can use username function to find out user, then use user to find related company.
In RLS expression, you can use above company id as filter parameter to apply security filter effect.
Logic:
1. Username -> user id.
2. User id -> company
3. User id and company id as filter condition.
If you still not clear for this, you can share some sample data and I will add these expression to your sample.
Regards,
Xiaoxin Sheng
How can I share my .pbix file here??
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
133 | |
76 | |
53 | |
38 | |
37 |
User | Count |
---|---|
203 | |
81 | |
71 | |
55 | |
48 |