Forum Discussion
Lakehouse Grant Read Permission Problem
- 9 months ago
After some tests, I got the exactly same error message. The cause could be the third to last limitation of schemas in this list: https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-schemas#public-preview-limitations .
There could be two solutions though they aren't perfect.
1. Stop using schema.
2. Use Pyspark instead like following, the address is an ABFS address.
df = spark.read.load("abfss://[email protected]/0558838e7/Tables/dbo/sales") display(df)
So as far as I understand from your words if I want to use lakehouse instead of warehouse, there should be more lakehouses in order to provide granular security. Am I right?
Hi ismail_ozturk,
You should be able to do this with OneLake RBAC: OneLake security access control model (preview) - Microsoft Fabric | Microsoft Learn
This is still in preview, so it might not work 100% and it might change.
If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.
- ismail_ozturk10 months ago
Helper I
Hello tayloramy ,
We can not do this just using onelake security roles, as far as I tested user needs to have viewer role in workspace of lakehouse at least. Otherwise user can not see the table data.
- tayloramy10 months ago
Super User
Hi ismail_ozturk,
To my knowledge the only way of restricting which files can be accessed via spark is with onelake security roles:
Table and folder security in OneLake - Microsoft Fabric | Microsoft LearnI tried this in my environment and it is not working for me however. Seems this preview feature is far more preview than I thought.
I guess multiple lakehouses would be the easy way around this, or using a warehouse where granular level permissions actually work.
If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.
- DaleT9 months ago
Resolver II
Hi,
We can achieve this without granting the user a view role in workspace. I changed the setting "Data access mode" in my test and I got it done. But this could be a big change to the security settings, I would suggest doing it with cautions. Please refer to the following.
1. Change the setting "Data access mode". This is in the "Settings" of SQL Endpotint only.
2. Create a role.
3. Done, use it in a notebook with Spark.
- ismail_ozturk9 months ago
Helper I
Hello DaleT ,
You are absolutely right I changed the "Data access mode" setting as "User's identity access mode" and the user sees only the tables which he has right to see. But if the same user tries to read these tables via spark, it gives an error "Artifact not found". I could not understand why 😞