Forum Discussion
padiga-isw
1 year agoFrequent Visitor
Getting logged in user from Power BI service
Hi Everyone, I am working on a custom connector that can interface a trino driver with Power BI Service, I am currently facing a hurdle where I want to implement a mechanism similar to SSO. I am usi...
- Anonymous1 year ago
Hi padiga-isw,
Thank you for reaching out to Microsoft Fabric Community Forum.
Power Query M does not provide a built-in way to get the logged-in Power BI Service user dynamically.
This function Extension.CurrentCredential[Username] may return the authenticated username. It works if your connector supports OAuth or Windows Authentication.
It Does not work if Power BI Service does not pass credentials or using Anonymous authentication.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Regards,
Vinay Pabbu
Akash_Varuna
1 year agoSuper User
Hi padiga-isw , Could you please try these
Effective Identity (RLS)
- Configure Row-Level Security in Power BI.
- Use the EffectiveUserName() passed via the gateway to impersonate the user in your driver.
Custom Headers/Parameters
- Use USERPRINCIPALNAME() in Power BI to get the logged-in user.
- Pass it as a parameter or header to the custom connector for impersonation.
Gateway Logging
- Enable logging on the gateway to track user access without directly passing the username to the driver.
If this post helped please do give a kudos and accept this as a solution
Thanks In Advance
- Enable logging on the gateway to track user access without directly passing the username to the driver.