Forum Discussion
Manage OneLake security Preview
- 11 months ago
Hi Joe_Barry ,
Thank you for reaching out to the Microsoft Community Forum.
Please check the below things
1. Temporarily replace USERPRINCIPALNAME() with a email to test if RLS works.
SELECT * FROM MyTable WHERE WorkEmail = '[email protected]'
2. Check that MyTable is under the dbo schema or update your query to match the actual schema. Check the table is properly registered in the Lakehouse and visible in Power BI.
3. Check that the test user has Read access to the Lakehouse. Access to the table via OneLake security. Matching data in the WorkEmail column.
4. Try querying the table directly using the SQL analytics endpoint with the test user’s credentials to see if the RLS is applied correctly.Please refer below links.
Solved: Re: RLS not wokring In OneLake security - Microsoft Fabric Community
Solved: Row Level Security in OneLake (preview). Major lim... - Microsoft Fabric Community
Row-level security - Microsoft Fabric | Microsoft Learn
OneLake Security for SQL analytics endpoints (Preview) - Microsoft Fabric | Microsoft Learn
Get started with OneLake security (preview) - Microsoft Fabric | Microsoft Learn
I hope this information helps. Please do let us know if you have any further queries.
Regards,
Dinesh
Hi Joe_Barry ,
Thank you for reaching out to the Microsoft Community Forum.
Please check the below things
1. Temporarily replace USERPRINCIPALNAME() with a email to test if RLS works.
SELECT * FROM MyTable WHERE WorkEmail = '[email protected]'
2. Check that MyTable is under the dbo schema or update your query to match the actual schema. Check the table is properly registered in the Lakehouse and visible in Power BI.
3. Check that the test user has Read access to the Lakehouse. Access to the table via OneLake security. Matching data in the WorkEmail column.
4. Try querying the table directly using the SQL analytics endpoint with the test user’s credentials to see if the RLS is applied correctly.
Please refer below links.
Solved: Re: RLS not wokring In OneLake security - Microsoft Fabric Community
Solved: Row Level Security in OneLake (preview). Major lim... - Microsoft Fabric Community
Row-level security - Microsoft Fabric | Microsoft Learn
OneLake Security for SQL analytics endpoints (Preview) - Microsoft Fabric | Microsoft Learn
Get started with OneLake security (preview) - Microsoft Fabric | Microsoft Learn
I hope this information helps. Please do let us know if you have any further queries.
Regards,
Dinesh
Thanks for your reply v-dineshya
I have got it working when I hardcode the email address
SELECT * FROM MyTable WHERE WorkEmail = '[email protected]'
USERPRINCIPALNAME() doesn't seem to work in the statement even though it doesn't throw an error when saving
- v-dineshya11 months ago
Community Support
Hi Joe_Barry ,
Thank you for the update. We are happy to hear that you have resolved the issue. Thanks for sharing the details here. Please do let us know if you have any further queries.
Regards,
Dinesh