Azure / Azure/Connectors

[Teams] Error 400 in sending message

Open
#171 0 comments 0 reactions 0 assignees View on GitHub
bug portal
Dominant language
JavaScript
Stars
20
Forks
7
Avg merge
7d 9h
Merged PRs (30d)
1

Description

### One-line summary

trying to send message with teams connector ALWAYS fails due to missing recipient

### Area of the portal

Connectors

### Severity

Medium (workaround exists, but annoying)

### What happened?

We tried to use the Teams connector to send a Teams message to an user.
Every time we call the connector with the field to filled with the mail, it fails with

error": "POST https://REDACTED.common.logic-westcentralus.azure-apihub.net/apim/teams/REDACTED/v1.0/teams/conversation/gatherinput/poster/Flow%20bot/location/Chat%20with%20Flow%20bot/$subscriptions failed with status 400: {\r\n \"error\": {\r\n \"code\": 400,\r\n \"message\": \"**### _The recipient is missing_**\",\r\n \"source\": \"REDACTED.common.logic-westcentralus.azure-apihub.net\",\r\n \"path\": \"choose[20]\\\\when[1]\",\r\n \"policyId\": \"\"\r\n }\r\n}

### What did you expect to happen?

To receive a message on teams

### Steps to reproduce

1. from azure.connectors.teams import PostCardAndWaitForResponseInput
2. return PostCardAndWaitForResponseInput(
notification_url=notification_url,
body=body,
)

3. body = {
"to": recipient,
"messageBody": json.dumps(card, separators=(",", ":")),
"isAlert": False,
}

with these we debug and we see that is sent the correct recipient

### Page URL

https://connectors.azure.com/:subscriptionId/:resourceGroup/:resourceName/connections

### App version / build / commit SHA

c5965f98

### Browser & version (User-Agent)

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36

### Viewport size & theme

1439x781 @ dark

### Entra tenant ID

8c586c92-cabd-4ce5-983a-be9869cdc625

### Azure subscription ID

651f7c62-50f2-474d-a2aa-a004377ff719

### Anything else

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the reported reproduction using azure.connectors.teams.PostCardAndWaitForResponseInput and inspect how notification_url and the body containing to and messageBody are sent. Reproduce the 400 response, then verify whether the recipient reaches the Teams connector; done means the connector accepts the recipient and delivers the Teams message.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.