az iot central api-token
Note
This reference is part of the azure-iot extension for the Azure CLI (version 2.46.0 or higher). The extension will automatically install the first time you run an az iot central api-token command. Learn more about extensions.
Manage API tokens for your IoT Central application.
IoT Central allows you to generate and manage API tokens to be used to access the IoT Central API. More information about APIs can be found at https://aka.ms/iotcentraldocsapi.
Commands
Name | Description | Type | Status |
---|---|---|---|
az iot central api-token create |
Generate an API token associated with your IoT Central application. |
Extension | GA |
az iot central api-token delete |
Delete an API token associated with your IoT Central application. |
Extension | GA |
az iot central api-token list |
Get the list of API tokens associated with your IoT Central application. |
Extension | GA |
az iot central api-token show |
Get details for an API token associated with your IoT Central application. |
Extension | GA |
az iot central api-token create
Generate an API token associated with your IoT Central application.
Note: Write down your token once it's been generated as you won't be able to retrieve it again.
az iot central api-token create --app-id
--role
--tkid
[--api-version {2022-06-30-preview, 2022-07-31}]
[--central-api-uri]
[--org-id]
[--token]
Examples
Add new API token
az iot central api-token create --token-id {tokenId} --app-id {appId} --role admin
Required Parameters
The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.
The role that will be associated with this token or user. You can specify one of the built-in roles, or specify the role ID of a custom role. See more at https://aka.ms/iotcentral-customrolesdocs.
The IoT Central ID associated with this token, [0-9a-zA-Z-] allowed, max length limit to 40. Specify an ID that you'll then use when modifying or deleting this token later via the CLI or API.
Optional Parameters
Argument 'api_version' has been deprecated and will be removed in a future release.
This command parameter has been deprecated and will be ignored.In the future release, we will only support IoT Central APIs from latest GA version.If any API is not GA yet, we will call latest preview version.
The IoT Central DNS suffix associated with your application.
The ID of the organization for the token role assignment. Only available for api-version == 1.1-preview.
If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az iot central api-token delete
Delete an API token associated with your IoT Central application.
az iot central api-token delete --app-id
--tkid
[--api-version {2022-06-30-preview, 2022-07-31}]
[--central-api-uri]
[--token]
Examples
Delete an API token
az iot central api-token delete --app-id {appid} --token-id {tokenId}
Required Parameters
The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.
The IoT Central ID associated with this token, [0-9a-zA-Z-] allowed, max length limit to 40. Specify an ID that you'll then use when modifying or deleting this token later via the CLI or API.
Optional Parameters
Argument 'api_version' has been deprecated and will be removed in a future release.
This command parameter has been deprecated and will be ignored.In the future release, we will only support IoT Central APIs from latest GA version.If any API is not GA yet, we will call latest preview version.
The IoT Central DNS suffix associated with your application.
If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az iot central api-token list
Get the list of API tokens associated with your IoT Central application.
Information in the list contains basic information about the tokens in the application and does not include token values.
az iot central api-token list --app-id
[--api-version {2022-06-30-preview, 2022-07-31}]
[--central-api-uri]
[--token]
Examples
List of API tokens
az iot central api-token list --app-id {appid}
Required Parameters
The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.
Optional Parameters
Argument 'api_version' has been deprecated and will be removed in a future release.
This command parameter has been deprecated and will be ignored.In the future release, we will only support IoT Central APIs from latest GA version.If any API is not GA yet, we will call latest preview version.
The IoT Central DNS suffix associated with your application.
If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az iot central api-token show
Get details for an API token associated with your IoT Central application.
List details, like its associated role, for an API token in your IoT Central app.
az iot central api-token show --app-id
--tkid
[--api-version {2022-06-30-preview, 2022-07-31}]
[--central-api-uri]
[--token]
Examples
Get API token
az iot central api-token show --app-id {appid} --token-id {tokenId}
Required Parameters
The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.
The IoT Central ID associated with this token, [0-9a-zA-Z-] allowed, max length limit to 40. Specify an ID that you'll then use when modifying or deleting this token later via the CLI or API.
Optional Parameters
Argument 'api_version' has been deprecated and will be removed in a future release.
This command parameter has been deprecated and will be ignored.In the future release, we will only support IoT Central APIs from latest GA version.If any API is not GA yet, we will call latest preview version.
The IoT Central DNS suffix associated with your application.
If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.