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

--dt-name --dtn -n

Digital Twins instance name.

Optional Parameters

--mi-system-assigned --system

Assign a system-assigned managed identity to this Digital Twin instance.

Accepted values: false, true
--mi-user-assigned --user

Assign user-assigned managed identities to this Digital Twin instance. Accepts space-separated list of identity resource ids.

--resource-group -g

Digital Twins instance resource group. You can configure the default group using az configure --defaults group={name}.

--role

Role to assign to the digital twin's system-assigned managed identity.

--scopes

Space separated list of scopes to assign the role (--role) for the system-assigned managed identity.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

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

--dt-name --dtn -n

Digital Twins instance name.

Optional Parameters

--mi-system-assigned --system

Remove the system-assigned managed identity to this Digital Twin instance.

Accepted values: false, true
--mi-user-assigned --user

Remove user-assigned managed identities to this Digital Twin instance. Accepts space-separated list of identity resource ids.

--resource-group -g

Digital Twins instance resource group. You can configure the default group using az configure --defaults group={name}.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

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

--dt-name --dtn -n

Digital Twins instance name.

Optional Parameters

--resource-group -g

Digital Twins instance resource group. You can configure the default group using az configure --defaults group={name}.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.