This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Hi,
I am very keen to see Onelake security in production. However, I would like to set column level security programmatically in a metadata driven setup of ingest into a medallion architecture.
I hear that the fabric rest api is the most mature programming interface. However I cannot see anything documented on onelake security. Indeed, when I set schema enabled on a lakehouse, I cannot even list tables.
import requests
token_string = mssparkutils.credentials.getToken(https://api.fabric.microsoft.com/)
header = {'Content-Type':'application/json','Authorization': f'Bearer {token_string}'}
response = requests.get(url=https://api.fabric.microsoft.com/v1/workspaces/{WORKSPACE_ID}/lakehouses/{LAKEHOUSE_ID}/tables, headers=header)
print("Status Code:", response.status_code)
print("Response JSON:", response.json())
------
Status Code: 400
Response JSON: Response JSON: {'requestId': 'blablah', 'errorCode': 'UnsupportedOperationForSchemasEnabledLakehouse', 'message': 'The operation is not supported for Lakehouse with schemas enabled.'}
And I find no mention of any attributes regarding onelake security! Anybody has any information on if there is something available now, or if there is going to be something on this soon? Or if there is some other way of setting these things programmatically.
Thank you
K
Solved! Go to Solution.
Hi @kjetil_hamre,
Welcome to the fun of preview features - don't try and push this into production until it becomes GA.
This is interesting, the error message you are getting states that lakehouses with schemas (also in preview and should not be in use in production) aren't supported, but the documentation seems to say otherwise:
Are you able to do this via the UI at all?
https://learn.microsoft.com/en-us/fabric/onelake/security/get-started-onelake-security
If you can, there might be a bug with the API.
If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.
Proud to be a Super User! | |
The first link is to the documentation I was looking for! Thank you. I am now able to set column level security on specific columns in the lakehouse. Just what I was looking for. As for the schema enabled lakehouse there might be a bug, but otherwise it works. Thanks!!!
regards,
Kjetil
Hi @kjetil_hamre,
Welcome to the fun of preview features - don't try and push this into production until it becomes GA.
This is interesting, the error message you are getting states that lakehouses with schemas (also in preview and should not be in use in production) aren't supported, but the documentation seems to say otherwise:
Are you able to do this via the UI at all?
https://learn.microsoft.com/en-us/fabric/onelake/security/get-started-onelake-security
If you can, there might be a bug with the API.
If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.
Proud to be a Super User! | |
Check out the April 2026 Fabric update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 6 | |
| 5 | |
| 5 |
| User | Count |
|---|---|
| 26 | |
| 14 | |
| 12 | |
| 10 | |
| 6 |