Share via


az communication identity token

注意

此參考是 Azure CLI 通訊延伸模組的一部分(2.59.0 版或更高版本)。 擴充功能會在您第一次執行 az communication identity token 命令時自動安裝。 深入了解擴充功能。

此命令群組已被取代,將在未來的版本中移除。 請改用「通訊使用者身分識別令牌」。

管理通訊服務資源使用者令牌的命令。

命令

名稱 Description 類型 狀態
az communication identity token get-for-teams-user

交換 Teams 使用者的 Azure Active Directory (Azure AD) 存取令牌,以取得具有相符到期時間的新 ACS 身分識別存取令牌。

副檔名 已取代
az communication identity token issue

發出具有指定使用者身分識別指定範圍的新存取令牌。 如果未指定任何使用者身分識別,也會建立新的用戶識別。

副檔名 已取代
az communication identity token revoke

撤銷特定 ACS 身分識別的所有存取令牌。

副檔名 已取代

az communication identity token get-for-teams-user

已被取代

此命令已被隱含取代,因為命令群組 'communication identity token' 已被取代,而且將在未來的版本中移除。 請改用「通訊使用者身分識別令牌」。

交換 Teams 使用者的 Azure Active Directory (Azure AD) 存取令牌,以取得具有相符到期時間的新 ACS 身分識別存取令牌。

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

範例

取得 Teams 使用者的令牌

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

必要參數

--aad-token

Teams 使用者的 Azure AD 存取令牌。

--aad-user

要針對 Azure AD 存取令牌中的 OID 宣告驗證的 Azure AD 使用者(Teams 使用者)物件識別碼。

--client

Azure AD 應用程式的用戶端標識碼,可針對 Azure AD 存取令牌中的 appId 宣告進行驗證。

選擇性參數

--connection-string

通訊 連接字串。 環境變數:AZURE_COMMUNICATION_CONNECTION_STRING。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az communication identity token issue

已被取代

此命令已被隱含取代,因為命令群組 'communication identity token' 已被取代,而且將在未來的版本中移除。 請改用「通訊使用者身分識別令牌」。

發出具有指定使用者身分識別指定範圍的新存取令牌。 如果未指定任何使用者身分識別,也會建立新的用戶識別。

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

範例

核發存取權杖

az communication identity token issue --scope chat

使用多個範圍和用戶發出存取令牌

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

必要參數

--scope

存取令牌的範圍清單,例如聊天/voip。

選擇性參數

--connection-string

通訊 連接字串。 環境變數:AZURE_COMMUNICATION_CONNECTION_STRING。

--user

ACS 識別碼。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az communication identity token revoke

已被取代

此命令已被隱含取代,因為命令群組 'communication identity token' 已被取代,而且將在未來的版本中移除。 請改用「通訊使用者身分識別令牌」。

撤銷特定 ACS 身分識別的所有存取令牌。

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

範例

撤銷存取令牌

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

必要參數

--user

ACS 識別碼。

選擇性參數

--connection-string

通訊 連接字串。 環境變數:AZURE_COMMUNICATION_CONNECTION_STRING。

--yes -y

不提示確認。

預設值: False
全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。