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 {false, true}]
[--user]
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
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.
IoT Hub name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
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
.
Assign a system-assigned managed identity to this hub.
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.
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 hub identity remove
Remove managed identities from an IoT Hub.
az iot hub identity remove [--ids]
[--name]
[--resource-group]
[--subscription]
[--system {false, true}]
[--user]
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
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.
IoT Hub name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Remove a system-assigned managed identity from this hub.
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.
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 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
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.
IoT Hub name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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.