Edit

Share via


REST API for Teams Phone Extensibility

This article describes REST API for Teams Phone extensibility.

Important

This feature of Azure Communication Services is currently in preview. Features in preview are publicly available and can be used by all new and existing Microsoft customers.

This preview version is provided without a service-level agreement, and we don't recommend it for production workloads. Certain features might not be supported or capabilities might be constrained.

For more information, see Supplemental Terms of Use for Microsoft Azure Previews.

Create assignment

Create an assignment to give a Teams user or Teams resource account access to the Communication Services resource.

PUT {endpoint}/access/teamsExtension/tenants/{tenantId}/assignments/{objectId}?api-version=2025-03-02-preview

URI parameters

Name In Required Type Description
objectId path true string Object ID of the principal, that is, the user ID or resource account ID.
tenantId path true string Tenant ID of the tenant that the principal belongs to.
api-version query true string Version of API to invoke.

Request body

Name In Required Type Description
request body true TeamsExtensionAssignmentCreateOrUpdateRequest Request for teams account assignment.

Responses

Name Type Description
200 OK TeamsExtensionAssignmentResponse Created - Returns the updated assignment.
201 Created TeamsExtensionAssignmentResponse Created - Returns the created assignment.
Other Status Codes CommunicationErrorResponse Error.

Get assignment

Get the assignment for a resource access from a Teams user or Teams resource account.

GET {endpoint}/access/teamsExtension/assignments/{objectId}?api-version=2025-03-02-preview

URI parameters

Name In Required Type Description
objectId path true string Object ID of the principal, that is, the user ID or resource account ID.

Responses

Name Type Description
200 OK TeamsExtensionAssignmentResponse Returns the assignment.
Other Status Codes CommunicationErrorResponse Error.

Delete assignment

Delete the assignment to remove resource access from a Teams user or Teams resource account.

DELETE {endpoint}/access/teamsExtension/assignments/{objectId}?api-version=2025-03-02-preview

URI parameters

Name In Required Type Description
objectId path true string Object ID of the principal, that is, the user ID or resource account ID.

Responses

Name Type Description
204 NoContent Empty Successful status code.
Other Status Codes CommunicationErrorResponse Error.

Definitions

Name Description
CommunicationError The Communication Services error.
CommunicationErrorResponse The Communication Services error.
TeamsExtensionAssignmentCreateOrUpdateRequest Request for creating or replacing an assignment.
principalType Type of the principal accessing the resource, either "user" or "teamsResourceAccount".
TeamsExtensionAssignmentResponse A Teams Phone assignment.

CommunicationError

Name Type Description
code string The error code.
details CommunicationError[] Further details about specific errors that led to this error.
innererror CommunicationError The inner error if any.
message string The error message.
target string The error target.

CommunicationErrorResponse

Name Type Description
error CommunicationError The Communication Services error.

TeamsExtensionAssignmentCreateOrUpdateRequest

Name Type Description
principalType string Type of the principal accessing the resource, either "user" or "teamsResourceAccount".
clientIds string[] List of IDs for the applications through which a "user" principal can access the resource.

TeamsExtensionAssignmentResponse

Name Type Description
objectId string Object ID of the assignment's principal.
tenantId string Tenant ID.
principalType string Type of the principal accessing the resource, either "user" or "teamsResourceAccount".
clientIds string[] List of IDs for the applications through which a "user" principal can access the resource.