Create Pull Request
| Date | Scan | Status | Result |
|---|---|---|---|
| 2026-01-14 00:00 | #250 | in_progress |
Biased
|
| 2026-01-13 00:00 | #246 | completed |
Biased
|
| 2026-01-11 00:00 | #240 | completed |
Biased
|
| 2026-01-10 00:00 | #237 | completed |
Biased
|
| 2026-01-09 00:34 | #234 | completed |
Biased
|
| 2026-01-08 00:53 | #231 | completed |
Biased
|
| 2026-01-06 18:15 | #225 | cancelled |
Clean
|
| 2025-08-17 00:01 | #83 | cancelled |
Biased
|
| 2025-07-17 00:00 | #53 | completed |
Biased
|
| 2025-07-13 21:37 | #48 | completed |
Biased
|
| 2025-07-12 23:44 | #41 | cancelled |
Biased
|
## Generate a configuration file
These steps produce a JSON configuration file for your development environment based on an existing IoT Central application. You also download all the existing device templates from the application.
1. Run the following PowerShell 7 script in the local copy of the IoT Central CI/CD repository:
## Generate IoT Central API tokens
In this guide, your pipeline uses API tokens to interact with your IoT Central applications. It's also possible to use a service principal.
> [!NOTE]
> IoT Central API tokens expire after one year.
Complete the following steps for both your development and production IoT Central apps.
1. In your IoT Central app, select **Permissions** and then **API tokens**.
1. Select **New**.
1. Give the token a name, specify the top-level organization in your app, and set the role to **App Administrator**.
1. Make a note of the API token from your development IoT Central application. You use it later when you run the *IoTC-Config.ps1* script.
1. Save the generated token from the production IoT Central application as a secret called `API-Token` to the production key vault:
1. Follow the instructions to sign in to your Azure account.
1. After you sign in, the script displays the IoTC Config options menu. The script can generate a config file from an existing IoT Central application and apply a configuration to another IoT Central application.
1. Select option **1** to generate a configuration file.
1. Enter the necessary parameters and press **Enter**:
- The API token you generated for your development IoT Central application.
- The subdomain of your development IoT Central application.
- Enter *..\Config\Dev* as the folder to store the config file and device templates.
- The name of your development key vault.
1. The script creates a folder called *IoTC Configuration* in the *Config\Dev* folder in your local copy of the repository. This folder contains a configuration file and a folder called *Device Models* for all the device templates in your application.
## Modify the configuration file
Now that you have a configuration file that represents the settings for your development IoT Central application instance, make any necessary changes before you apply this configuration to your production IoT Central application instance.
1. Create a copy of the *Dev* folder created previously and call it *Production*.
1. Open IoTC-Config.json in the *Production* folder using a text editor.
1. The file has multiple sections. However, if your application doesn't use a particular setting, that section is omitted from the file: