Azure / Azure/azure-sdk-for-python
[azure-communication-callautomation] connect_call() should support teamsMeetingLink as a CallLocatorKind
- Dominant language
- Python
- Stars
- 5.6k
- Forks
- 3.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 193
Description
**Labels:** `feature-request`, `Azure.Communication.CallAutomation`
## Description
The ACS Call Automation SDK's `connect_call()` method does not support joining a Teams meeting via a Teams meeting link. The `CallLocatorKind` enum only accepts `groupCallLocator`, `serverCallLocator`, and `roomCallLocator` — but not `teamsMeetingLink`.
This forces developers building bots that need to join Teams meetings programmatically to bypass the ACS SDK entirely and use the Microsoft Graph Communications API (`POST /communications/calls`) instead, losing the benefits of ACS Call Automation (media streaming, call recording, DTMF, etc.).
## Repro Steps
1. Install `azure-communication-callautomation==1.6.0b1`
2. Attempt to connect to a Teams meeting using a meeting link:
```python
from azure.communication.callautomation import CallAutomationClient
client = CallAutomationClient.from_connection_string(conn_str)
# There is no way to pass a Teams meeting link to connect_call()
# The method signature only accepts: server_call_id, group_call_id, room_id
result = client.connect_call(
callback_url="https://mybot.azurewebsites.net/api/calls/events",
# No parameter for teams_meeting_link
)
```
3. If you try to call the REST API directly with `"kind": "teamsMeetingLink"` in the call locator, the service returns:
```
400 Bad Request
Error converting value "teamsMeetingLink" to type
'Microsoft.Skype.Platform.ExecutionAgent.Azure.Communication.Service.Common.CallLocator.Dto.v2.CallLocatorKind'
```
## Expected Behavior
`connect_call()` (or a new method like `connect_to_teams_meeting()`) should accept a Teams meeting join URL and connect the ACS bot to that meeting. For example:
```python
result = client.connect_call(
teams_meeting_link="https://teams.microsoft.com/l/meetup-join/...",
callback_url="https://mybot.azurewebsites.net/api/calls/events",
)
```
Or alternatively, `CallLocatorKind` should be extended to include `teamsMeetingLink`, and the service-side `connect` endpoint should handle it the same way `create_call` handles `TeamsMeetingLinkLocator`.
## Actual Behavior
- The Python SDK `connect_call()` only accepts `server_call_id`, `group_call_id`, or `room_id`
- The REST API `connect` endpoint rejects `teamsMeetingLink` as a `CallLocatorKind`
- There is no SDK-level path to join a Teams meeting via ACS Call Automation
## Inconsistency with `create_call()`
Note that `create_call()` **does** support Teams meeting links via `TeamsMeetingLinkLocator`:
```python
from azure.communication.callautomation import TeamsMeetingLinkLocator
locator = TeamsMeetingLinkLocator("https://teams.microsoft.com/l/meetup-join/...")
client.create_call(target_participant=locator, callback_url=callback_url)
```
However, `create_call()` requires an ACS user identity to place the call as, which is not suitable for server-side bots that need to join meetings as application-level participants (without a user context).
The `connect` endpoint is the correct pattern for this use case, but it lacks Teams meeting link support.
## Environment
- **SDK**: `azure-communication-callautomation==1.6.0b1`
- **API version**: `2025-08-15-preview`
- **Python**: 3.12
- **OS**: Linux (Azure App Service) / macOS (local dev)
## Swagger Reference
The `CallLocatorKind` enum in the [swagger spec](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/communication/data-plane/CallAutomation/preview/2025-08-15-preview/communicationservicescallautomation.json) for the `connect` endpoint only defines:
```json
"CallLocatorKind": {
"type": "string",
"enum": ["groupCallLocator", "serverCallLocator", "roomCallLocator"]
}
```
## Impact
Without this capability, developers who need a server-side bot to join an existing Teams meeting must abandon the ACS SDK and implement the Microsoft Graph Communications API directly, which:
- Loses access to ACS Call Automation features (media streaming, call recording, real-time transcription, DTMF)
- Requires separate Graph API permission grants (`Calls.JoinGroupCall.All`)
- Adds significant complexity for a common bot scenario
## Suggested Fix
1. Add `teamsMeetingLink` to the `CallLocatorKind` enum in the service
2. Accept `teams_meeting_link` as a parameter in the Python SDK's `connect_call()`
3. Alternatively, add a new `connect_to_teams_meeting(meeting_link, callback_url, ...)` convenience method
Contributor guide
Assessment
This issue has not been assessed yet.