Request failed - deleting an integration runtime

Rajendra Kumar 0 Reputation points
2024-07-18T11:22:44.7033333+00:00

Developer created one test Self-hosted Integration Runtime to scan a couple of services on Microsoft Purview. Now, post the testing, we are trying to delete the SHIR, but it gets failed with status code 400. We already checked the scan and data sources, no further references. However, every time gets the below errors whenever try to delete IR.

Request failed with status code 400 Request ID: c0c5fb8b-2f74-4fac-aad8-c1d876e00d32 {"code":"BadRequest","message":"The document cannot be deleted since it is referenced by XXXXXXXXXXX-77ac-409e-a22f-d0ad195b2deb.","target":"/subscriptions/XXXXXXXXXXXX-43e5-bdf6-3a45b0a4fce9/resourceGroups/scanning-prod-southafricanorth/providers/Microsoft.DataFactory/factories/purview-XXXXXXXXXX6e72-40d8-80e5-8fda3e24b41a/integrationruntimes/SHIR-VMXXXXXXXXXX","details":null,"error":null}

Can anyone suggest how to troubleshoot and delete this Integration Runtime.

Microsoft Purview
Microsoft Purview
A Microsoft data governance service that helps manage and govern on-premises, multicloud, and software-as-a-service data. Previously known as Azure Purview.
1,157 questions
{count} votes

1 answer

Sort by: Most helpful
  1. phemanth 10,330 Reputation points Microsoft Vendor
    2024-07-18T16:22:00.4566667+00:00

    @Rajendra Kumar

    Thanks for the question and using MS Q&A platform

    The error message indicates that the Integration Runtime (SHIR) cannot be deleted because it is still referenced by another resource, specifically the one with ID XXXXXXXXXXX-77ac-409e-a22f-d0ad195b2deb.

    To troubleshoot and delete the Integration Runtime, follow these steps:

    1. Check for dependencies: Verify that there are no active or pending scans, data sources, or other resources that are still using the SHIR. Make sure all scans and data sources are stopped or deleted.
    2. Check the Purview portal: Log in to the Purview portal and navigate to the Data sources page. Search for the SHIR name or ID to see if it's still associated with any data sources. If found, remove the association or delete the data source.
    3. Check the Azure Data Factory (ADF) portal: If the SHIR was created in ADF, log in to the ADF portal and navigate to the Author & Monitor section. Check if there are any active or pending pipelines, datasets, or linked services that are using the SHIR. If found, delete or update them to remove the SHIR reference.
    4. Check Azure Resource Manager (ARM) templates: If you used ARM templates to deploy the SHIR, check the templates for any references to the SHIR. Update or delete the templates to remove the SHIR reference.
    5. Use Azure CLI or PowerShell: Try deleting the SHIR using Azure CLI or PowerShell commands. This can help you identify if there's a specific resource blocking the deletion.
    
    az datafactory integration-runtime delete --name <SHIR_NAME> --resource-group <RESOURCE_GROUP_NAME> --factory-name <DATA_FACTORY_NAME>
    
    
    Remove-AzDataFactoryIntegrationRuntime -Name <SHIR_NAME> -ResourceGroupName <RESOURCE_GROUP_NAME> -DataFactoryName <DATA_FACTORY_NAME>
    
    

    Remember to replace the placeholders (<SHIR_NAME>, <RESOURCE_GROUP_NAME>, <DATA_FACTORY_NAME>) with the actual values for your environment.

    Hope this helps. Do let us know if you any further queries.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.