次の方法で共有


Communication Identity - Exchange Teams User Access Token

Teams ユーザーの Azure Active Directory (Azure AD) アクセス トークンを、有効期限が一致する新しいコミュニケーション ID アクセス トークンと交換します。

POST {endpoint}/teamsUser/:exchangeAccessToken?api-version=2023-10-01

URI パラメーター

名前 / 必須 説明
endpoint
path True

string

通信リソース (例: https://my-resource.communication.azure.com

api-version
query True

string

呼び出す API のバージョン。

要求本文

名前 必須 説明
appId True

string

Azure AD アクセス トークン内の appid 要求に対して検証される Azure AD アプリケーションのクライアント ID。

token True

string

新しいコミュニケーション ID アクセス トークンを取得するための Teams ユーザーの Azure AD アクセス トークン。

userId True

string

Azure AD アクセス トークンの oid 要求に対して検証される Azure AD ユーザー (Teams ユーザー) のオブジェクト ID。

応答

名前 説明
200 OK

CommunicationIdentityAccessToken

成功

Other Status Codes

CommunicationErrorResponse

エラー

Exchange a Teams user access token

要求のサンプル

POST https://my-resource.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2023-10-01

{
  "token": "AzureActiveDirectoryAccessTokenOfATeamsUser",
  "appId": "2c3e1e83-8fd7-4615-ad2b-b8c1229845ac",
  "userId": "32c0a5db-05ec-78ea-51ab-3f06b329397e"
}

応答のサンプル

{
  "token": "CommunicationIdentityAccessToken",
  "expiresOn": "2023-10-10T21:39:39.3244584+00:00"
}

定義

名前 説明
CommunicationError

Communication Services エラー。

CommunicationErrorResponse

Communication Services エラー。

CommunicationIdentityAccessToken

アクセス トークン。

TeamsUserExchangeTokenRequest

CommunicationError

Communication Services エラー。

名前 説明
code

string

エラー コード。

details

CommunicationError[]

このエラーの原因となった特定のエラーの詳細。

innererror

CommunicationError

内部エラーがある場合。

message

string

エラー メッセージ。

target

string

エラーターゲット。

CommunicationErrorResponse

Communication Services エラー。

名前 説明
error

CommunicationError

Communication Services エラー。

CommunicationIdentityAccessToken

アクセス トークン。

名前 説明
expiresOn

string (date-time)

トークンの有効期限。

token

string

ID に対して発行されたアクセス トークン。

TeamsUserExchangeTokenRequest

名前 説明
appId

string

Azure AD アクセス トークン内の appid 要求に対して検証される Azure AD アプリケーションのクライアント ID。

token

string

新しいコミュニケーション ID アクセス トークンを取得するための Teams ユーザーの Azure AD アクセス トークン。

userId

string

Azure AD アクセス トークンの oid 要求に対して検証される Azure AD ユーザー (Teams ユーザー) のオブジェクト ID。