Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
adave
Frequent Visitor

Pass Credentials to Data Source

We are using Power BI report sever Aug 2018 version. I want to create a dashboard which can allow displaying charts dynamically based on user logged in. There are some reports/charts that need to be displayed but a supervisor is allowed to only view data for his/her employees.  I need to be able to pass on the user who logged on as a parameter to a stored procedure . The stored procedures accepts the user id and will return the relevant data.

Is this possible to achieve?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

You can do more or less the same thing in the PBI Service. It gets more complicated if your data source is on premise as you have to setup the gateway but there areplenty of tutorials kicking around.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

What you can do is pass the user credentials to the database by configuring the data source when you deploy the PBIX. If the databse is on a different server you will need to configure kerberos between the source database and the PBI-SSRS server so the credentials don't get dropped and your user arrives as "ANONYMOUS"

 

If you do that you don't need to pass the user ID as a parameter. You can just use the USER_NAME() function in T-SQL in your stored proc to get the logged in user name. If you use a Data Gateway then this probably gets vene more complciated in terms of Kerberos Setup.

 

These two links are useful when it comes to Kerberos related stuff.

 

https://www.youtube.com/watch?v=vCH8Fa3OpQ0

 

https://blog.dbi-services.com/power-bi-report-server-kerberos-setup/

Hello @Anonymous 

Thanks for your reply on this. I havent actually tried to use this as the project I needed this for was postponed. I am now again about look into it and had another question. At some point in future, we are considering to move to Power BI Service. If we were to use Power BI service for distribution of reports to users, how would the same issue of passing credentials work. Is there another option available with Power BI service to provide the same functionality?

Anonymous
Not applicable

You can do more or less the same thing in the PBI Service. It gets more complicated if your data source is on premise as you have to setup the gateway but there areplenty of tutorials kicking around.

Thanks @Anonymous 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.