cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Databricks AI/BI Get Session User

mmsanteago
New Contributor

Hello everyone,

I am currently working with Databricks AI/BI Dashboards and I have a specific requirement regarding user context.

I need to dynamically capture the "session user" (the person who is currently viewing the dashboard) rather than the "execution user" (the owner/creator of the dashboard). My goal is to use this information to apply row-level security based on who is accessing the panel.

I know about the CURRENT_USER() function, but I would like to know:

  1. Is there a specific built-in parameter or function to strictly get the viewer's email/username even if the dashboard is running with owner credentials?

  2. If this is not currently possible, is there any known workaround, or is this feature on the product roadmap?

Thanks in advance for the help!

1 REPLY 1

ivanvyd
New Contributor III

@mmsanteago with Share data permissions, queries run using the publisher's permissions, so viewer-based RLS does not apply. Honestly, I'm not aware of a supported dashboard parameter or SQL function that exposes the actual viewer while keeping that execution model.

If per-user security is required, Individual data permissions is the supported approach. Each viewer then queries with their own credentials, and Unity Catalog row filters and column masks are enforced for that viewer.