{"id":15291307,"url":"https://github.com/azure/iotc-migrator","last_synced_at":"2025-10-20T03:31:33.487Z","repository":{"id":41761430,"uuid":"354935115","full_name":"Azure/iotc-migrator","owner":"Azure","description":"A Companion Experience that enables you to move devices between Azure IoT Central applications or move devices from an Azure IoT Central application to an Azure IoT Hub","archived":false,"fork":false,"pushed_at":"2024-03-28T08:39:52.000Z","size":5917,"stargazers_count":4,"open_issues_count":3,"forks_count":6,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-01-26T15:03:14.233Z","etag":null,"topics":["iot","iot-central"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Azure.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-05T18:37:51.000Z","updated_at":"2023-07-07T06:58:27.000Z","dependencies_parsed_at":"2024-08-29T00:13:13.367Z","dependency_job_id":null,"html_url":"https://github.com/Azure/iotc-migrator","commit_stats":null,"previous_names":["iot-for-all/iotc-migrator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fiotc-migrator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fiotc-migrator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fiotc-migrator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fiotc-migrator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Azure","download_url":"https://codeload.github.com/Azure/iotc-migrator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237254298,"owners_count":19280017,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["iot","iot-central"],"created_at":"2024-09-30T16:11:53.025Z","updated_at":"2025-10-20T03:31:27.977Z","avatar_url":"https://github.com/Azure.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Azure IoT Central device migration tool\nA companion experience that enables you to move devices between IoT Central applications and from/to Azure IoT Hub.\n\n## Requirements\n- An IoT Central application (or two if moving between applications)\n    \u003e Go to [IoT Central](https://apps.azureiotcentral.com/home) to create one.\n- An Azure Active Directory Application (AAD)\n    \u003e Follow instructions [here](./docs/appregistration.md).\n- An IoT Hub instance (if migrating from/to Azure IoT Hub)\n    \u003e Go to [Azure Portal \u003e IoT Hub](https://portal.azure.com/#create/Microsoft.IotHub) to create one IoT Hub.\n- An Azure IoT Hub Device Provisioning Services (DPS) associated to the IoT Hub instance.\n    \u003e Go to [Azure Portal \u003e DPS](https://portal.azure.com/#create/Microsoft.IoTDeviceProvisioning) to create one DPS.\n\n## Setup\nCreate a file called _.env_ in project root with following content after completed AAD creation steps above.\n\n```ini\nPORT=3002\nREACT_APP_AAD_APP_CLIENT_ID=\u003cyour-AAD-Application-(client)-ID\u003e\nREACT_APP_AAD_APP_TENANT_ID=\u003cyour-AAD-Directory-(tenant)-ID\u003e\nREACT_APP_AAD_APP_REDIRECT_URI=http://localhost:3002\n```\n\n\u003e Make sure that the REACT_APP_AAD_APP_REDIRECT_URI in the config file and the Redirect URIs specified in your AAD Application are the same.\n\n### Model requirements\nTo successfully perform a migration from an IoT Central application, the template for the devices to be migrated must comply to a specific configuration. The easiest and quickest way to define required capabilities is to import the _DeviceMigration_ component into the template.\n\nYou can find the json file [here](./assets/deviceMigrationComponent.json). \n\nFollow instructions on [IoT Central official documentation](https://docs.microsoft.com/en-us/azure/iot-central/core/howto-set-up-template#interfaces-and-components).\n\n\u003eThis repository contains few [code samples](./device_samples) showing how to handle the migration process from device side.\n\n## Run\nYou can run the tool in development mode using:\n```sh\nnpm start\n```\n- Open in the browser the AADRedirectURI url previously defined in your _.env_ (by default is http://localhost:3002) to view it in the browser.\n\n- Authenticate the user.\n\n\n### Options\n1. __IoT Central -\u003e IoT Hub__\n\nPick the needed values from source and target forms. Provide a name and click on _Migrate_ button.\n\nFollow instructions on the page to create a new enrollment group in the DPS instance then click on _Start migration_.\n\n\u003cimg src='./assets/c2h.png' width='500px'/\u003e\n\u003cimg src='./assets/copykeys.png' width='500px'/\u003e\n\n2. __IoT Central -\u003e IoT Central__\n\nPick the needed values from source and target forms. \nOptionally specify a target template to automatically assign migrating devices to a particular template in the application.\nProvide a name and click on _Migrate_ button. \nWait for the migration job to be configured. After that the job will automatically start and you can follow the progress in the _Migration status_ page.\n\n\u003cimg src='./assets/c2c.png' width='500px'/\u003e\n\n3. __IoT Hub -\u003e IoT Central__\n\n\nSelect the hubs from which migrating devices, provide a name and click on _Migrate_ button. The job has been configured and available in the _Migration status_ page. Once there click on \"Run\" and provide the required keys following instructions.\n\n\u003cimg src='./assets/h2c.png' width='500px'/\u003e\n\u003cimg src='./assets/status.png' width='500px'/\u003e\n\u003cimg src='./assets/form.png' width='500px'/\u003e\n\nWait for the job to complete.\n\n\n### Codebase\n_iotc-migrator_ is a React SPA application written in Typescript that runs 100% in the browser. It was bootstrapped with Create React App.\n\nThe project consume public Azure APIs on the latest stable versions.\n\nThe Authentication is performed using Microsoft Authentication Library (MSAL).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazure%2Fiotc-migrator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazure%2Fiotc-migrator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazure%2Fiotc-migrator/lists"}