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.
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.
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?