0

I'm creating a chat bot that handles basic IT Support tasks. I've created a flow within a Power Virtual Agent, that puts the user that made the support request into a teams chat with myself.

I've created the flow, called it, which it reaches and then attempts to create the chat. But I get a BadRequest error. I would understand this if I was entering my own email, as well as the other users id but I am only entering the bot.UserID variable into the Members to Add Input.

bot.UserID = 4521-****-****-****

My user id = 5784-****-****-****

Members to add: 4521-****-****-****


{
  "error": {
    "code": "BadRequest",
    "message": "Duplicate chat members is specified in the request body.",
    "innerError": {
      "date": "2022-07-12T11:50:15",
      "request-id": "5784-****-****-****",
      "client-request-id": "5784-****-****-****"
    }
  }
}

{
  "Transfer-Encoding": "chunked",
  "Vary": "Accept-Encoding",
  "Strict-Transport-Security": "*****",
  "request-id": "5784-****-****-****",
  "client-request-id": "5784-****-****-****",
  "x-ms-ags-diagnostic":
  "Timing-Allow-Origin": "*",
  "x-ms-apihub-cached-response": "true",
  "x-ms-apihub-obo": "true",
  "Date": "Tue, 12 Jul 2022",
  "Content-Type": "application/json",
  "Content-Length": "***"
}

I'm only adding the user with their bot.UserID which is not equal mine, I'm automatically placed in the chat because I created the bot so I'm not including myself.

bot.UserName is the name of the person who raised the support request and does not equal my name.

Where's the duplicate coming from?

Thomton
  • 13
  • 3

1 Answers1

0

When you create a chat, you are automatically added as well, which is why you have a duplicate error. Just remove yourself from the Members to Add field and it should work.

Gabriel
  • 101
  • Wasn't the problem. only the user I wanted to add into the chat with me was in the Members to Add field. As outlined in the question body – Thomton Aug 22 '22 at 13:48
  • Is it possible that the chat is created by the user and not you in the flow? In that case, that would explain why you have a duplicate error. Did you try to only put yourself in Members to Add? Do you have an error if you do that? – Gabriel Aug 23 '22 at 10:13