Forum Discussion
Can't delete orphaned lakehouse SQL analytics endopoint and semantic model
- 1 year ago
It appears that there's an auto-cleanup process running in the background because after 2-3 days of waiting the orphaned lakehouse disappears. I've done this twice now for good measure.
Hi dzav,
- Use Power BI REST API or PowerShell to delete the orphaned artifacts
There’s no delete button in Fabric UI, but you can use the REST API to delete these semantic models manually:
Power BI REST API: Delete Dataset
DELETE https://api.powerbi.com/v1.0/myorg/groups/{workspaceId}/datasets/{datasetId}
You’ll need:
- Workspace ID (target workspace)
- Dataset ID (of the orphaned semantic model)
You can get these from:
- Power BI Admin Portal
- Workspace URL (the GUID)
- Dataset list from the REST API or even the browser's dev tools
If you're not comfortable with REST calls, I can help you write a quick PowerShell script using Invoke-RestMethod.
- Rename the orphaned artifact (via REST API)
Renaming could help release the name lock so you can redeploy the original Lakehouse.
PATCH https://api.powerbi.com/v1.0/myorg/groups/{workspaceId}/datasets/{datasetId}
Content-Type: application/json
{
"name": "Orphaned_Dataset_Backup"
}
Permissions Needed
You must have:
Admin or Member access to the workspace
Fabric admin permissions if using Admin APIs
Either Power BI Admin role or permission to register applications for API use
Dataset renaming isn't supported via REST API and the DELETE is unable to delete a dataset nested under a lakehouse. This also doesn't address the sql endpoint that's orphaned, which the REST API doesn't have methods to handle.