Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Can someone provide me a sample code as how to create a Lakehouse shortcut with an Entra Service Principal programmatic?
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
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')}"
}
}
}
And this is the end result in my example Lakehouse
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 .
Ask questions in Data Engineering, Data Science, Data Warehouse and General Discussion.
Check out the April 2024 Fabric update to learn about new features.