az dt identity
Note
This reference is part of the azure-iot extension for the Azure CLI (version 2.59.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 --dtn
[--mi-system-assigned --system {false, true}]
[--mi-user-assigned --user]
[--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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Assign a system-assigned managed identity to this Digital Twin instance.
Property | Value |
---|---|
Accepted values: | false, true |
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.
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.
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.
Property | Value |
---|---|
Default value: | False |
az dt identity remove
Remove managed identities from a Digital Twins instance.
az dt identity remove --dt-name --dtn
[--mi-system-assigned --system {false, true}]
[--mi-user-assigned --user]
[--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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Remove the system-assigned managed identity to this Digital Twin instance.
Property | Value |
---|---|
Accepted values: | false, true |
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.
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.
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.
Property | Value |
---|---|
Default value: | False |
az dt identity show
Show the identity properties of a Digital Twins instance.
az dt identity show --dt-name --dtn
[--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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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.
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.
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.
Property | Value |
---|---|
Default value: | False |