Skip to main content
Microsoft Idea

Power BI

Needs Votes

Assign USERNAME () to parameter of a SQL function data source

Vote (53) Share
rlhane's profile image

rlhane on 05 Jun 2016 05:03:28

We can ensure record level filtering by user if we could just get the username!

Please provide an option to pass the user name as a function parameter when establishing a function as a data source.

That HAS to be easy and it will give us a solid means of providing record level security.

Comments (4)
rlhane's profile image Profile Picture

Angelica on 05 Jul 2020 23:31:46

RE: Assign USERNAME () to parameter of a SQL function data source

me too I need a solution for this! when you have big data this becomes a must.

rlhane's profile image Profile Picture

Pat on 05 Jul 2020 22:59:17

RE: Assign USERNAME () to parameter of a SQL function data source

Please provide a version of USERNAME () function that return AD user name (vs the UPN) name. A user's name is more commonly captured in the data source that a user's email.

rlhane's profile image Profile Picture

Frank Miller on 05 Jul 2020 22:41:16

RE: Assign USERNAME () to parameter of a SQL function data source

I also need a solution for the same problem. Unfortunatelly there is currently no way to pass PowerBI user name to azure sql and to apply SQL RLS there based on the user name.

rlhane's profile image Profile Picture

Anup Thakur on 05 Jul 2020 22:27:42

RE: Assign USERNAME () to parameter of a SQL function data source

Hello Power BI Team, any update on above request? we would also like to pass username to SQL database functions or way to query SQL db in current user context when hosted.

We have big security model which we don't want to import to RLS, we want to keep security model to db layer only.