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.
The Box folder, to which the object from the
partner app domain (referenced in partner_item_id
) is mapped
"42037322"
ID of the folder
"folder"
folder
Value is always folder
The schema for an integration mapping mapped item object for type Teams.
"19%ABCD-Avgfggkggyftdtfgghjhkhkhh%40thread:tacv2"
ID of the mapped item (of type referenced in type
)
"channel"
Type of the mapped item referenced in id
Value is one of 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.
Returns the created integration mapping.
Returns a bad_request
if an incorrect options
was supplied or the Box folder cannot be
mapped to this partner_item_id
.
Error codes:
SERVICE_ACCOUNT_IS_NOT_A_COOWNER_OR_OWNER
- service account
doesn't have co-owner collaboration or is
not an owner of the box_item_id
,CHANNEL_ALREADY_MAPPED
- channel is already
mapped to another 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.
An unexpected client error.
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);
{
"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"
}
}