Forum Discussion

kur83's avatar
kur83
Helper I
2 years ago
Solved

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?

 

 

 

  • Anonymous's avatar
    Anonymous
    2 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:

    Identity support for logging into the Microsoft Fabric - Microsoft Fabric REST APIs | Microsoft Learn

    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

  • Anonymous's avatar
    Anonymous
    Not 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:

    Identity support for logging into the Microsoft Fabric - Microsoft Fabric REST APIs | Microsoft Learn

    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.


     

    • kur83's avatar
      kur83
      Helper I

      We had "Allow Service Principal to Create and Use Profile" disabled. After enabling, it started working. Thanks for the help.

      • Devon_Rtk's avatar
        Devon_Rtk
        New 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. 
    • kur83's avatar
      kur83
      Helper 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.