cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
adave Frequent Visitor
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

Accepted Solutions
stpnet Established Member
Established Member

Re: Pass Credentials to Data Source

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
Highlighted
stpnet Established Member
Established Member

Re: Pass Credentials to Data Source

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/

adave Frequent Visitor
Frequent Visitor

Re: Pass Credentials to Data Source

Hello @stpnet 

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?

stpnet Established Member
Established Member

Re: Pass Credentials to Data Source

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

adave Frequent Visitor
Frequent Visitor

Re: Pass Credentials to Data Source

Thanks @stpnet 

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors (Last 30 Days)