question

enadedic-1481 avatar image
1 Vote"
enadedic-1481 asked enadedic-1481 commented

Transfer ownership of IoTHub to another subscription

Hello,
While we are aware that the azure subscription can be transferred to another tenant, is this possible if Azure IoT hub is part of subscription?

Also do we need to touch the devices or will the SAS keys work directly with Azure IoT ?

With gratitude
Ena

azure-iot-hubazure-iot
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

SandervandeVelde42 avatar image
1 Vote"
SandervandeVelde42 answered enadedic-1481 commented

Hello @enadedic-1481 ,

Due to the fact, an IoT Hub has a public endpoint and specific credentials and specific routes to services, it seems complicated to move an IoT Hub to another tenant.

Especially for cases like this, the Device Provisioning service is a great way for migration.

The typical migration path is (from the top of my hat):

  1. Have all your devices use a DPS to connect to an IoT Hub.

  2. Create a second IoT hub somewhere in the world (it can be part of a second subscription).

  3. Link the new IoT hub to the same DPS (the REST API support adding a connection string of an IoT HUb living in another subscription)

  4. Connect that IoT Hub to services, routes, etc. but do not provide it device registrations.

  5. Each device enrollment related to the 'old' iot hub, add the new iot hub and give it a 'static configuration' to that new iot hub

  6. give the device registration in the old IoT hub new credentials.

Because the device cannot connect to the old IoT hub, it will try to reprovision. Then it will be redirected to the new iot hub.

It's possible to migrate data. Please check the DPS documentation.

Due to the amount of work, You could try to automate this using the REST API of both the IoT Hub and DPS.



· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you for the detailed answer. Unfortunately, we are not using DPS and using SAS token. I think our only option is to create a new lot hub in the new subscription and re-configure the devices.

1 Vote 1 ·

Hello @enadedic-1481 ,

I understand.

I just checked. I was not able to update the (primary) key of an IoT hub device registration with a specific key. I was only able to regenerate.

I recommend including a DPS this time, together with the described scenario.

Regards,

Sander

1 Vote 1 ·

@SandervandeVelde42 this is really really good support. Thanks a lot.

1 Vote 1 ·

Hello @enadedic-1481 ,

you're welcome.

If an answer is helpful, please "Accept answer" or "Up-Vote" for the same which might be beneficial to other community members reading this thread.

1 Vote 1 ·