Sagar Sharma
Sagar Sharma

Reputation: 3

How to move IoT Central application from one subscription to another

I created one IoT Central app form https://apps.azureiotcentral.com/ in my own subscription for a PoC. Now my customer wants me to move it to their own subscription. Question, is it possible to move the whole app? Or do I need to create a new app and then export/import templates, devices and data?

Upvotes: 0

Views: 385

Answers (2)

Roman Kiss
Roman Kiss

Reputation: 8235

Try the following Copy feature:

enter image description here

EDIT:

For creating a device instance assigned to the compability model can be used, for instance, the REST API.

The following is an example of the device provisioning using the REST API request for myScopeId, mydevice, deviceKey and CapabilityModelId:

PUT:

https://global.azure-devices-provisioning.net/myScopeId/registrations/mydevice/register?api-version=2019-03-31

headers:

Authorization: sas-token

payload:

{
  "registrationId":"mydevice",
  "payload":{
    "__iot:interfaces":{
      "CapabilityModelId":"urn:rigado:Cascade_500:1"
    }
  }
}

where the sas-token can be generated like is described here:

generateSasToken(string resourceUri, string key, string policyName, int expiryInSeconds = 3600)

where:

resourceUri = "myScopeId/registrations/mydevice"
key = deviceKey
policyName = "registration"

Upvotes: 1

lmasieri
lmasieri

Reputation: 26

You can migrate your application without having to re-create it by visiting the Azure Portal (portal.azure.com) > search for "IoT Central Application" > Find your application and click on it. Inside your application you'll see the subscription it's currently using, and an option to change it. Follow the steps to migrate your subscription.

Ibiza portal screenshot highlighting where the "change" button is.

Keep in mind that moving your application from one subscription to another will not change where your application or device data is stored. For example, if you picked United States as the location for your application, the data will continue to be in the United States, even if your subscription/resource group is in a different region.

Upvotes: 0

Related Questions