Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I have a requirement to filter data in power BI based on user .
So when a user logs in Power BI desktop
So in short , Can i trigger a graph api call on power BI login and filter data based on response .
Thanks,
Shreyas
Hi @shreyasr ,
Yes, it is possible to trigger a Graph API call on Power BI login to get user attributes and filter data based on the response. You can use the Power Query SDK to create a custom data connector that calls the Graph API and retrieves the user attributes. Then, you can use row-level security (RLS) to filter the data based on the user attributes. RLS is a feature that allows a dataset owner to restrict access to the data for the users consuming it. This is done via roles, that users are assigned to. Each role is basically a DAX expression, and there's 2 types of such roles/expressions: regular/static RLS, where the same filter is applied to all users in that role, and dynamic RLS, where the filtering condition uses the username() or the userprincipalname() functions. Those functions resolve to the domain name / UPN of the user visualizing the data, which means that the filtering condition will be different for each user.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.