Forum Discussion
row level & view level security not working through live connection to SQL server
I have created a report which fetches the data from View (from SQL server) through live connection.
This view gives the result based on individual user's access.
Following is the query
select <blah>
from <blah>
where UserAlias = (SUBSTRING(SUSER_SNAME(), CHARINDEX('\', SUSER_SNAME(), 1) + 1, LEN(SUSER_SNAME())))
If individual goes to SQL server and fetches the data from this view, user can see only those records what they are supposed to see.
But from report (which I have published on PowerBI), it always takes my credential and shows the same data to everyone. I also created a new measure using USERNAME() DAX function. And funny thing is - it shows current user who is looking at the report but while fetching the data from SQL server, it uses my credential.
Not sure if this is a bug, can you please help me ASAP?
We are dealing with creating a report which fetches the data based on MS Sales security.
Thanks,
Nisarg