Creates a Teams integration mapping by mapping a Teams channel to a Box item. You need Admin or Co-Admin role to use this endpoint.
パートナーアプリのドメインのオブジェクト (partner_item_id
で参照) のマッピング先であるBoxフォルダ
"42037322"
フォルダのID
"folder"
folder
次の値に固定: folder
The schema for an integration mapping mapped item object for type Teams.
"19%ABCD-Avgfggkggyftdtfgghjhkhkhh%40thread:tacv2"
(type
で参照されるタイプの) マッピングされた項目のID
"channel"
id
で参照されるマッピングされた項目のタイプ
次の値のいずれか1つ: channel
,team
"hjgjgjg-bhhj-564a-b643-hghgj685u"
ID of the team that is registered with Microsoft Teams.
"abcd-defg-1235-7890"
ID of the tenant that is registered with Microsoft Teams.
作成された統合マッピングを返します。
誤ったoptions
が指定された場合またはBoxフォルダをこのpartner_item_id
にマッピングできない場合にbad_request
を返します。エラーコードは以下のとおりです。
SERVICE_ACCOUNT_IS_NOT_A_COOWNER_OR_OWNER
- サービスアカウントに共同所有者のコラボレーションがないか、サービスアカウントがbox_item_id
の所有者ではありません。CHANNEL_ALREADY_MAPPED
- チャンネルがすでに別のbox_item_id
にマッピングされています。TEAM_ALREADY_MAPPED
- team is already mapped to another box_item_id
,BOX_ENTERPRISE_MISMATCH
- Box folder must be owned by the enterprise, which is configured to use Box as Content layer for Teams,BOX_FOLDER_EXTERNALLY_OWNED
- Box folder must be internally owned to the admin's enterpriseFOLDER_ALREADY_MAPPED
- Box folder must not be mapped to another integration mapping.Returns a not_found
error if the integration mapping, record or folder could not be found.
予期しないクライアントエラー。
await userClient.integrationMappings.createTeamsIntegrationMapping({
partnerItem: {
type: 'channel' as IntegrationMappingPartnerItemTeamsCreateRequestTypeField,
id: partnerItemId,
tenantId: tenantId,
teamId: teamId,
} satisfies IntegrationMappingPartnerItemTeamsCreateRequest,
boxItem: new FolderReference({ id: folder.id }),
} satisfies IntegrationMappingTeamsCreateRequest);
user_client.integration_mappings.create_teams_integration_mapping(
IntegrationMappingPartnerItemTeamsCreateRequest(
type=IntegrationMappingPartnerItemTeamsCreateRequestTypeField.CHANNEL,
id=partner_item_id,
tenant_id=tenant_id,
team_id=team_id,
),
FolderReference(id=folder.id),
)
await userClient.IntegrationMappings.CreateTeamsIntegrationMappingAsync(requestBody: new IntegrationMappingTeamsCreateRequest(partnerItem: new IntegrationMappingPartnerItemTeamsCreateRequest(type: IntegrationMappingPartnerItemTeamsCreateRequestTypeField.Channel, id: partnerItemId, tenantId: tenantId, teamId: teamId), boxItem: new FolderReference(id: folder.Id)));
{
"id": "12345",
"type": "integration_mapping",
"box_item": {
"id": "42037322",
"type": "folder"
},
"created_at": "2012-12-12T10:53:43-08:00",
"integration_type": "teams",
"is_overridden_by_manual_mapping": true,
"modified_at": "2012-12-12T10:53:43-08:00",
"partner_item": {
"id": "19%3ABCD-Avgfggkggyftdtfgghjhkhkhh%40thread:tacv2",
"type": "channel",
"team_id": "hjgjgjg-bhhj-564a-b643-hghgj685u",
"tenant_id": "E1234567"
}
}