Is there a way either via REST APIs or SDKto change a device’s org in IoT Central?

191 Views Asked by At

When I create a device via the IoT Hub SDK it assigns the device to the parent org. Is there a way to change the org programmatically via the SDK or the REST (IoT Central or Hub)?

1

There are 1 best solutions below

2
Johnson Yang On BEST ANSWER

You can try to use PATCH /api/devices/:id?api-versoin=2022-07-31 with JSON payload:

{
   "organizations": ["org-id-to-be-updated"]
}