Forum Discussion

Joe_Barry's avatar
Joe_Barry
Solution Sage
10 months ago
Solved

Manage OneLake security Preview

I recently got access to try out OnleLake Security for Lakehouse.

 

I set up a role and implemented RLS choosing the table where I want RLS implmented, using a select statement & adding the user.

SELECT * FROM MyTable WHERE WorkEmail = USERPRINCIPALNAME()

 

I created a test report in Power BI using the table with RLS. I published it, gave the test user Read permissions on the data model and shared the report with them. Then they get a query user error on the visual that uses data from the table. 

"Error retrieving data for this visual.
Details:
Expression.Error: The key didn't match any rows in the table.
Microsoft.Data.Mashup.ErrorCode = 10061
Key = [Schema = "dbo", Item = "MyTable"]
Table = #table({"Name", "Data", "Schema", "Item", "Kind"}, {})
The key didn't match any rows in the table.
The exception was triggered by the IDbCommand interface."

 

I've seen mentioned in a post from April this year, that USERPRINCIPALNAME isn't available, but I was able to add it to my statement without throwing an error. Is it avavilable now? I then gave read access on the lakehouse to the user, but the same result

 

Also in the Lakehouse settings, I activated "Use OneLake security for tables (User's identity access mode)"

 

Am I missing any steps?  I'm quite sure I followed all the instructions. in the documenation

 

Thanks

Joe

 

 

3 Replies