Microsoft Teams Send Message - [400] 'user@odata.bind' field is missing in the request

Hi There,

I’m trying to send a one on one message with the Microsoft Teams Send Message module, but I keep on getting the error “[400] ‘user@odata.bind’ field is missing in the request”. I’ve tried to send User ID and email in the “Members” field:
INPUT BUNDLE:
[
{
“choose”: “chat”,
“select”: “yes”,
“members”: [
“f46d60a2-cc39-44ae-8d05-d9ffe5e7242f”
],
“message”: “oi”,
“chatType”: “oneOnOne”,
“contentType”: “text”
}
]
ERROR:

Any ideas? Am I mapping the wrong field?

I think found the issue, but I don’t know how to solve:
When I send a One On One chat without mapping the input bundle looks like this:
[
{
“choose”: “chat”,
“select”: “yes”,
“members”: [
https://graph.microsoft.com/v1.0/users/f46d60a2-cc39-44ae-8d05-d9ffe5e7242f”,
https://graph.microsoft.com/v1.0/users/738c2e13-d23b-433a-ae6e-ee5686d4abe4
],
“message”: “oi, eu sou um robô”,
“chatType”: “oneOnOne”,
“contentType”: “text”
}
]

So now I know that i need to concatenate “https://graph.microsoft.com/v1.0/users/” with the user ID, but I don’t know how to format it in a way that it could looks like:

        "members": [
            "https://graph.microsoft.com/v1.0/users/f46d60a2-cc39-44ae-8d05-d9ffe5e7242f",
            "https://graph.microsoft.com/v1.0/users/738c2e13-d23b-433a-ae6e-ee5686d4abe4"
        ]

I’m just getting:

      "members": [
            "https://graph.microsoft.com/v1.0/users/f46d60a2-cc39-44ae-8d05-d9ffe5e7242f,https://graph.microsoft.com/v1.0/users/738c2e13-d23b-433a-ae6e-ee5686d4abe4"
        ]

What do I need to write in the Members field to correctly send it?

Okay… solved using the split function:

{{split("https://graph.microsoft.com/v1.0/users/f46d60a2-cc39-44ae-8d05-d9ffe5e7242f,https://graph.microsoft.com/v1.0/users/738c2e13-d23b-433a-ae6e-ee5686d4abe4"; ",")}}

Anyway… I think this module could receive an update to specify that the user ID must be mapped and also to concatenate the URL: “https://graph.microsoft.com/v1.0/users/

2 Likes