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.
Hi,
I have configured a PowerBI report using Gateway and data source connection to SQL Server (the SQL server in Azure VM) with my Windows service credentials . I want to render customized data based on the logged-in user privileges. Is there a way to configure PowerBI to connect directly to a SQL server based on the logged-in user information? Basically, I am trying to see from PowerBI if I can directly query as the logged-in user (passing the user identity to the SQL server) without using the service account configured in the gateway. Note: PowerBI communicates with the SQL server through a view, and the view currently does not provide us with the username (could not attempt roles + row-level security). Please kindly share your thoughts.
Thanks!
Hey @Indra_n ,
Unfortunatelly, when using Power BI with a direct connection to a SQL Server, you can't directly pass the logged-in user's identity to the SQL Server unless (and maybe) you are using the "Effective Username" feature in combination with Row-Level Security (RLS).
Please note that setting up Effective Username and RLS may require changes to your SQL Server and may depend on your specific setup. It's a powerful feature for security but can be complex to configure based on your use case.
If you are unable to access the username in the view directly, you may need to consider modifying your SQL Server setup to capture or map user identities. Additionally, working with a local service account configured in the gateway for secure communication is a common practice, as it isolates the data source from direct user access.
Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
76 | |
63 | |
51 | |
48 |
User | Count |
---|---|
204 | |
86 | |
64 | |
59 | |
56 |