az dt identity
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 dt identity command. Learn more about extensions.
Manage identites of a Digital Twins instance.
Commands
Name | Description | Type | Status |
---|---|---|---|
az dt identity assign |
Assign managed identities to a Digital Twins instance. |
Extension | GA |
az dt identity remove |
Remove managed identities from a Digital Twins instance. |
Extension | GA |
az dt identity show |
Show the identity properties of a Digital Twins instance. |
Extension | GA |
az dt identity assign
Assign managed identities to a Digital Twins instance.
az dt identity assign --dt-name
[--mi-system-assigned {false, true}]
[--mi-user-assigned]
[--resource-group]
[--role]
[--scopes]
Examples
Assign a system-assigned identity to a Digital Twins instance and assign a role to that identity.
az dt identity assign -n {instance_name} --mi-system-assigned --role "Azure Event Hubs Data Sender" --scopes {resource_id}
Assign two user-assigned identities to a Digital Twins instace.
az dt identity assign -n {instance_name} --mi-user-assigned {resource_id} {resource_id}
Required Parameters
Digital Twins instance name.
Optional Parameters
Assign a system-assigned managed identity to this Digital Twin instance.
Assign user-assigned managed identities to this Digital Twin instance. Accepts space-separated list of identity resource ids.
Digital Twins instance resource group. You can configure the default group using az configure --defaults group={name}
.
Role to assign to the digital twin's system-assigned managed identity.
Space separated list of scopes to assign the role (--role) for the system-assigned managed identity.
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 dt identity remove
Remove managed identities from a Digital Twins instance.
az dt identity remove --dt-name
[--mi-system-assigned {false, true}]
[--mi-user-assigned]
[--resource-group]
Examples
Remove the system-assigned identity from a Digital Twins instance.
az dt identity remove -n {instance_name} --mi-system-assigned
Remove two user-assigned identities from a Digital Twins instance.
az dt identity remove -n {instance_name} --mi-user-assigned {resource_id} {resource_id}
Remove all identities from a Digital Twins instance.
az dt identity remove -n {instance_name} --mi-user-assigned --mi-system-assigned
Required Parameters
Digital Twins instance name.
Optional Parameters
Remove the system-assigned managed identity to this Digital Twin instance.
Remove user-assigned managed identities to this Digital Twin instance. Accepts space-separated list of identity resource ids.
Digital Twins instance resource group. You can configure the default group using az configure --defaults group={name}
.
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 dt identity show
Show the identity properties of a Digital Twins instance.
az dt identity show --dt-name
[--resource-group]
Examples
Show identity properties of a Digital Twins instance.
az dt identity show -n {instance_name} -g {resource_group}
Required Parameters
Digital Twins instance name.
Optional Parameters
Digital Twins instance resource group. You can configure the default group using az configure --defaults group={name}
.
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.
Azure CLI