Share via


az communication user-identity token

Note

This reference is part of the communication extension for the Azure CLI (version 2.59.0 or higher). The extension will automatically install the first time you run an az communication user-identity token command. Learn more about extensions.

Command group 'communication user-identity' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Commands to manage user tokens for a Communication Service resource.

Commands

Name Description Type Status
az communication user-identity token get-for-teams-user

Exchanges an Azure Active Directory (Azure AD) access token of a Teams user for a new ACS Identity access token with a matching expiration time.

Extension Preview
az communication user-identity token issue

Issues a new access token with the specified scopes for a given User Identity. If no User Identity is specified, creates a new User Identity as well.

Extension Preview
az communication user-identity token revoke

Revokes all access tokens for the specific ACS Identity.

Extension Preview

az communication user-identity token get-for-teams-user

Preview

Command group 'communication user-identity token' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Exchanges an Azure Active Directory (Azure AD) access token of a Teams user for a new ACS Identity access token with a matching expiration time.

az communication user-identity token get-for-teams-user --aad-token
                                                        --aad-user
                                                        --client
                                                        [--connection-string]

Examples

Get token for teams user

az communication user-identity token get-for-teams-user --aad-token "aad-123-xyz" --client "app-id-123-xyz" --aad-user "uid"

Required Parameters

--aad-token

Azure AD access token of a Teams User.

--aad-user

Object ID of an Azure AD user(Teams User) to be verified against the OID claim in the Azure AD access token.

--client

Client ID of an Azure AD applicationto be verified against the appId claim in the Azure AD access token.

Optional Parameters

--connection-string

Communication connection string. Environment variable: AZURE_COMMUNICATION_CONNECTION_STRING.

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 communication user-identity token issue

Preview

Command group 'communication user-identity token' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Issues a new access token with the specified scopes for a given User Identity. If no User Identity is specified, creates a new User Identity as well.

az communication user-identity token issue --scope
                                           [--connection-string]
                                           [--user]

Examples

Issue access token

az communication user-identity token issue --scope chat

Issue access token with multiple scopes and user

az communication user-identity token issue --scope chat voip --user "8:acs:xxxxxx"

Required Parameters

--scope

List of scopes for an access token ex: chat/voip.

Optional Parameters

--connection-string

Communication connection string. Environment variable: AZURE_COMMUNICATION_CONNECTION_STRING.

--user

ACS identifier.

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 communication user-identity token revoke

Preview

Command group 'communication user-identity token' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Revokes all access tokens for the specific ACS Identity.

az communication user-identity token revoke --user
                                            [--connection-string]
                                            [--yes]

Examples

Revoke access tokens

az communication user-identity token revoke --user "8:acs:xxxxxx"

Required Parameters

--user

ACS identifier.

Optional Parameters

--connection-string

Communication connection string. Environment variable: AZURE_COMMUNICATION_CONNECTION_STRING.

--yes -y

Do not prompt for confirmation.

Default value: False
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.