How to force delete Azure IoT DPS instance when operation in progress?

Al Rodriguez 1 Reputation point
2022-10-28T13:34:00.373+00:00

Hi, I have 2 instances of Azure IoT DPS running that I've been using for testing. They were created with some automation and I'm unable to delete them manually, with an error saying an operation is in progress. I've been getting this message since yesterday. Is there a way for me to force delete the 2 instances?

If it helps to debug, when I run the delete command with the debug flag (az iot dps delete --name {{my-name}} --debug), there's a GET request made for the DPS instance and it appears the provisioning state is still Activating. This must have been running for the past day. Pretty sure something is locked.

"properties": {
"state": "Activating",
"provisioningState": "Activating",
"iotHubs": [],
"allocationPolicy": "Hashed",
"idScope": null
},

The error message I get from trying to delete one of the instances is:
(409304) Operation in progress. If you contact a support representative please include this correlation identifier: 3dab906d-e09d-4fd5-a070-0dbbffe2708d, timestamp: 2022-10-28 13:27:54Z, errorcode: IH409304.
Code: 409304
Message: Operation in progress. If you contact a support representative please include this correlation identifier: 3dab906d-e09d-4fd5-a070-0dbbffe2708d, timestamp: 2022-10-28 13:27:54Z, errorcode: IH409304.

Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,128 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. AshokPeddakotla-MSFT 27,966 Reputation points
    2022-10-31T05:02:24.163+00:00

    @Al Rodriguez Welcome to Microsoft Q&A forum!

    Apologies for the delay in response. You said, you have created the DPS instances using automation. Is there a chance that your automation script still access the DPS instances and running any registrations against it?

    As mentioned in the Troubleshooting guide Common error codes, The request could not be completed due to a conflict with the current state of the target Device Provisioning Service instance.

    255532-image.png

    What is the status of your DPS instances showing under Azure Portal? Did you try deleting them from the portal directly?

    255509-image.png

    I suggest you, try deleting the instances from the portal directly or use the below command and update the status.

    az iot dps delete --name your_Dps_name --resource-group Your_ResourceGroup  
    

    Feel free to comment on this post with the latest status. Do let us know if it helps. We would be happy to help you resolve this issue further.

    If the response is helpful, please click "Accept Answer" and upvote it.


  2. Al Rodriguez 1 Reputation point
    2022-11-17T04:16:22.003+00:00

    I wanted to add an answer to this in case someone else finds this thread in the future. The fix required making a support ticket with Microsoft so an engineer within Azure can resolve it.

    The problem that was explained to me, was that there was an issue on Azure's side while provisioning the instance of the IoT DPS service. I don't know what caused it, but they seemed confident it wouldn't happen again. After re-creating the instance of the IoT DPS service multiple times, I have not been able to reproduce it.

    0 comments No comments