[Resolved] Cannot delete device as it is part of active bot deployment in A360 ![:tada: 🎉](https://cdn.jsdelivr.net/emojione/assets/png/1f389.png?v=2.2.7)
In this post, we'll address the recurring challenge of encountering the error "Cannot delete device as it is part of an active bot deployment," particularly when your BOT is persistently stuck in the In Progress Stage, hindering its transition to the history section. Additionally, this solution is applicable to scenarios where you are utilizing a Community or On-Prem Control Room and facing the following issues:
- BOT stuck in In Progress Stage and not able to move it to history
- BOT stuck in Pending execution Stage and not able to move it to history
- Cannot delete device as it is part of an active bot deployment
You can follow the same steps or solution through video as well.
Error: The device cannot be deleted since it is involved in an ongoing bot deployment.
When executing your bot, you may encounter a situation where the previous run becomes stuck, preventing you from initiating the bot again.
![](https://uploads-us-west-2.insided.com/automationanywhere-en/attachment/2ed70f87-bf17-494e-81e7-6ea008014be7.jpg)
At times, the error persists even after uninstalling and reinstalling the bot agent. Attempting to delete the device proves challenging, as it remains integral to an ongoing bot deployment.
hSolution]:
Note:
- You need to have postman with access to the cloud
- Access to this API is restricted to Admin.
- In the instance of the community edition, user "CE_bot" has the privilege to access it.
Step1: Go to the Postman and Authenticate
Method: POST
URI: https://<Control Room>/v1/authentication
Body
{ “username”: “<Admin user>”, “password”: “<Admin Pass>” }
OR
{ “username”: “<CE user>”, “password”: “<CE Pass>” }
Step2: Copy the token generated
Note: For SSO-based user login, use the API Key instead of the password to generate the Authentication token.
![](https://uploads-us-west-2.insided.com/automationanywhere-en/attachment/afa679d6-85a4-4275-b4f5-11cf17096e35.png)
Step3: Reset the device
Method: POST
URI: https://<Control Room>/v2/devices/reset
Headers:
KEY:x-authorization
VALUE: <Token copied from step 2>
Body
{"deviceIds": {"ids": p<Device ID>]}}
For example, if my device id is 987964 then the API body will look like the below:
{"deviceIds": {"ids": w209350]}}
![](https://uploads-us-west-2.insided.com/automationanywhere-en/attachment/45bb74b6-fd98-417e-8c69-e54c86cef83d.png)
![](https://uploads-us-west-2.insided.com/automationanywhere-en/attachment/eade7631-e356-4aaf-b867-77bb6b26c32b.png)
Finding Device ID in A360 Control Room
You can get the device ID by going to Control Room> Devices > Click on the device name or view device > in the URL, you’ll see the device id.
https://<Control Room>/#/devices/mydevices/<DeviceID>/view
![](https://uploads-us-west-2.insided.com/automationanywhere-en/attachment/e3a77452-6e12-440f-854b-c016eac5c20b.png)
If the device has been eliminated from the Control Room, and you are uncertain about the device ID or need to perform this action for multiple devices, you can employ the provided text in the body of the mentioned API call.
{"allDevices": {}}
Thanks,
Ganesh Bhat
AI Brahma