Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Passing LDAP as parameter to Procedure in PowerBI

I have requirement to pass user logged inn LDAP to Procedure as below.

If my LDAP is nagm then that should be passed as follows. Procedure accepts nagm or 'nagm' [meaning with or without quotes]

EXEC [DDOM_BIZOPS].[dbo].[usp_access_check_view] nagm


Placing direct LDAP is returning data as expected but our requirment is to to replace USERNAME_ [replacing with their logged inn LDAP] and run the procedure so that they can see only data that they have access to.


I tried with UPN as follows: 

Then tried as follows in query and its not replacing as nagm but passing USERNAME_ as a value directly and so no data returned.

EXEC [DDOM_BIZOPS].[dbo].[usp_access_check_view] USERNAME_


Please let me know if this works in PowerBI or have to use Report Builder tool to achieve this.

Community Support
Community Support

Thanks for the response.

We are currently using this RLS approach only and filtering data by UserPrincipleName(). It works well only if we give App access.

We have to give workspace access to Users [self-service] and if they download the PowerBI file, they can see all data.

DB wanted to handle this backend and they asked to pass user logged inn LDAP to Procedure and so like to know if we can pass UserPrincipleName() to Procedure.

Frequent Visitor

We need to pass captured UserPrincipleName() to EXEC Procedure so that User can see only the data that user has eligibility.

Please let me know if any details needed. 

Helpful resources

2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Top Solution Authors