Forum Discussion
Need help to create Lakehouse programmatically using Service Principal
Need help to create Lakehouse programmatically using Service Principal
I tried Fabric Rest API and it gives error as Fabric Rest API doesn't support Service Principal.
Rest API: https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/lakehouses
Documentation Link - https://learn.microsoft.com/en-us/rest/api/fabric/lakehouse/items/create-lakehouse
Is there any other way to create lakehosue using service principal or Managed Identity?
- Anonymous2 years ago
Hi,kur83
We believe that the main reason you have an issue with the Fabric Rest API not supporting service principals is because your administrator has not turned on the following settings for you:
Here is a screenshot of the official document:
Here is a link to the official documentation:
You may need to note that you need to enable the corresponding API and be in the fabric capacity.
Of course, if you have any new ideas, you are welcome to contact us.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
7 Replies
- AnonymousNot applicable
Hi,kur83
We believe that the main reason you have an issue with the Fabric Rest API not supporting service principals is because your administrator has not turned on the following settings for you:
Here is a screenshot of the official document:
Here is a link to the official documentation:
You may need to note that you need to enable the corresponding API and be in the fabric capacity.
Of course, if you have any new ideas, you are welcome to contact us.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- kur83Helper I
We had "Allow Service Principal to Create and Use Profile" disabled. After enabling, it started working. Thanks for the help.
- Devon_RtkNew Member
- Can you provide the rest api script you used to create a item, I having problem in creating items, get 400 bad request. Also not sure how to create or update notebooks or lakehouse. Kindly provide the script used, I have provide all mentioned permissions. Much needed help. My . Lakehouse,. Notebook,. Pipeline folders are stored in azure repo. Witj each folder containing. Platform and respective json Or. Py files. Now I want to use azure devops yaml and powershell to deploy it to uat using rest api and service principal.
- kur83Helper I
Documentation states that Create Item is not supported.
FYI.. We can use Service principal to create workspace and list lakehouse or list items but create item or create lakehouse gives error.
- AnonymousNot applicable
Hi, kur83
Thank you for the correction and quick reply.
You can try to use Power Automate cloud flow to automatically create a lakehouse, and here are the links to related questions, I hope you find it helpful:
Programmatic Lakehouse Shortcut Creation with an E... - Microsoft Fabric CommunityBest Regards,
Leroy Lu