Skip to content

Conversation

@v-dharmarajv
Copy link
Member

Adding support for the microsoftteamsapp identifier

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for the MicrosoftTeamsAppIdentifier as a valid communication identifier type throughout the Call Automation SDK. This allows developers to use Microsoft Teams app identities when creating calls, redirecting calls, transferring calls, and adding participants.

Changes:

  • Added MicrosoftTeamsAppIdentifier constructor overloads to CallInvite and TransferCallToParticipantOptions model classes
  • Added comprehensive unit tests for both synchronous and asynchronous clients covering createCall, redirectCall, transferCall, and addParticipant operations
  • Updated CHANGELOG.md to document the new feature in version 1.5.3

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
CHANGELOG.md Documents the new MicrosoftTeamsAppIdentifier support feature in version 1.5.3
CallInvite.java Adds constructor accepting MicrosoftTeamsAppIdentifier for call invitation targets
TransferCallToParticipantOptions.java Adds constructor accepting MicrosoftTeamsAppIdentifier for call transfer targets
CallConnectionUnitTests.java Adds unit tests for transfer and add participant operations with MicrosoftTeamsAppIdentifier
CallConnectionAsyncUnitTests.java Adds async unit tests for transfer and add participant operations with MicrosoftTeamsAppIdentifier
CallAutomationClientUnitTests.java Adds unit tests for redirect call operations with MicrosoftTeamsAppIdentifier
CallAutomationAsyncClientUnitTests.java Adds async unit tests for createCall and redirectCall operations with MicrosoftTeamsAppIdentifier

Comment on lines +124 to +148
@Test
public void redirectCallWithMicrosoftTeamsAppIdentifier() {
CallAutomationClient callAutomationClient
= getCallAutomationClient(new ArrayList<>(Collections.singletonList(new SimpleEntry<>("", 204))));
MicrosoftTeamsAppIdentifier teamsAppIdentifier
= new MicrosoftTeamsAppIdentifier(CALL_TARGET_ID, CommunicationCloudEnvironment.PUBLIC);
CallInvite target = new CallInvite(teamsAppIdentifier);

callAutomationClient.redirectCall(CALL_INCOMING_CALL_CONTEXT, target);
}

@Test
public void redirectCallWithResponseMicrosoftTeamsAppIdentifier() {
CallAutomationClient callAutomationClient
= getCallAutomationClient(new ArrayList<>(Collections.singletonList(new SimpleEntry<>("", 204))));
MicrosoftTeamsAppIdentifier teamsAppIdentifier
= new MicrosoftTeamsAppIdentifier(CALL_TARGET_ID, CommunicationCloudEnvironment.PUBLIC);
CallInvite target = new CallInvite(teamsAppIdentifier);
RedirectCallOptions redirectCallOptions = new RedirectCallOptions(CALL_INCOMING_CALL_CONTEXT, target);

Response<Void> redirectCallResponse
= callAutomationClient.redirectCallWithResponse(redirectCallOptions, Context.NONE);

assertEquals(204, redirectCallResponse.getStatusCode());
}
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test coverage appears incomplete. The CallAutomationAsyncClientUnitTests includes tests for createCall and createCallWithResponse using MicrosoftTeamsAppIdentifier (lines 183-214 in the async tests), but the CallAutomationClientUnitTests does not include equivalent tests for the synchronous createCall APIs. For consistency and completeness, consider adding corresponding tests in CallAutomationClientUnitTests.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

@github-actions
Copy link
Contributor

github-actions bot commented Jan 21, 2026

API Change Check

APIView identified API level changes in this PR and created the following API reviews

com.azure:azure-communication-callautomation

Copy link
Contributor

Copilot AI commented Jan 23, 2026

@v-dharmarajv I've opened a new pull request, #47793, to work on those changes. Once the pull request is ready, I'll request review from you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants