-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Adding support for the microsoftteamsapp identifier #47770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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
MicrosoftTeamsAppIdentifierconstructor overloads toCallInviteandTransferCallToParticipantOptionsmodel 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 |
...ain/java/com/azure/communication/callautomation/models/TransferCallToParticipantOptions.java
Show resolved
Hide resolved
| @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()); | ||
| } |
Copilot
AI
Jan 21, 2026
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
|
@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. |
Adding support for the microsoftteamsapp identifier