Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
asankab
Helper I
Helper I

Programmatic Lakehouse Shortcut Creation with an Entra Service Principal

Can someone provide me a sample code as how to create a Lakehouse shortcut with an Entra Service Principal programmatic?

5 REPLIES 5
asankab
Helper I
Helper I

Thank you Expiscornovus, will give a try and get back to you in the next couple of days

 

Thanks

Hi @asankab ,

I hope you got some insight. Please let us know once you tried it.
Thank you

Expiscornovus
Resolver III
Resolver III

Hi @asankab,

 

Yes, that should be possible via the Fabric REST API:

https://learn.microsoft.com/en-us/rest/api/fabric/core/onelake-shortcuts/create-shortcut?tabs=HTTP

 

Below is an example in a Power Automate cloud flow

 

URI

https://api.fabric.microsoft.com/v1/workspaces/@{variables('WorkspaceId')}/items/@{variables('LakehouseId')}/shortcuts

 

Body

{
  "name": "PowerAutomateOrdersShortcut",
  "path": "Files",
  "target": {
    "oneLake": {
      "itemId": "773faa37-826f-4f9b-830f-e2a7a23e3903",
      "path": "Tables/orders",
      "workspaceId": "@{variables('WorkspaceId')}"
    }
  }
}

 

createshortcut_fabriclakehouse.png

 

And this is the end result in my example Lakehouse

 

shortcutresult_fabric.png

Thanks Expiscornovus, I will check this and get back to you within this week!

Hi @asankab ,

We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet .
In case if you have any resolution please do share that same with the community as it can be helpful to others .
Otherwise, will respond back with the more details and we will try to help .

Helpful resources

Announcements
Expanding the Synapse Forums

New forum boards available in Synapse

Ask questions in Data Engineering, Data Science, Data Warehouse and General Discussion.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Update Carousel

Fabric Monthly Update - April 2024

Check out the April 2024 Fabric update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors