az iot hub identity
Manage identities of an Azure IoT hub.
Commands
Name | Description | Type | Status |
---|---|---|---|
az iot hub identity assign |
Assign managed identities to an IoT Hub. |
Core | GA |
az iot hub identity remove |
Remove managed identities from an IoT Hub. |
Core | GA |
az iot hub identity show |
Show the identity properties of an IoT Hub. |
Core | GA |
az iot hub identity assign
Assign managed identities to an IoT Hub.
az iot hub identity assign [--ids]
[--name]
[--resource-group]
[--role]
[--scopes]
[--subscription]
[--system --system-assigned {false, true}]
[--user --user-assigned]
Examples
Assign user-assigned managed identities to an IoT Hub
az iot hub identity assign --name MyIoTHub --resource-group MyResourceGroup --user-assigned {resourceId1} {resourceId2}
Assign a system-assigned managed identity to an IoT Hub and assign a role to that identity.
az iot hub identity assign --name MyIoTHub --resource-group MyResourceGroup --system-assigned --role "Storage Blob Data Contributor" --scopes {resourceId}
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
IoT Hub name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Role to assign to the hub's system-assigned managed identity.
Space separated list of scopes to assign the role (--role) for the system-assigned managed identity.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Assign a system-assigned managed identity to this hub.
Property | Value |
---|---|
Accepted values: | false, true |
Assign user-assigned managed identities to this hub. Accept space-separated list of identity resource IDs.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az iot hub identity remove
Remove managed identities from an IoT Hub.
az iot hub identity remove [--ids]
[--name]
[--resource-group]
[--subscription]
[--system --system-assigned {false, true}]
[--user --user-assigned]
Examples
Remove a user-assigned managed identity from an IoT Hub
az iot hub identity remove --name MyIoTHub --resource-group MyResourceGroup --user-assigned {resourceId}
Remove a system-assigned managed identity from an IoT Hub.
az iot hub identity remove --name MyIoTHub --resource-group MyResourceGroup --system-assigned
Remove all identities from an IoT Hub.
az iot hub identity remove --name MyIoTHub --resource-group MyResourceGroup --system-assigned --user-assigned
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
IoT Hub name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Remove a system-assigned managed identity from this hub.
Property | Value |
---|---|
Accepted values: | false, true |
Remove user-assigned managed identities from this hub. Accept space-separated list of identity resource IDs.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az iot hub identity show
Show the identity properties of an IoT Hub.
az iot hub identity show [--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Show identity properties of an IoT Hub
az iot hub identity show --name MyIoTHub --resource-group MyResourceGroup
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
IoT Hub name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |