cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Nyko
Frequent Visitor

Teams - Create a chat - Bad Request 400 error

Hi everyone,

 

I'm in the process of setting up a ticket based technical support system.
I'd like to create a group chat with the user who submitted the ticket & the operator who was assigned the ticket.

I'm inputting the emails of the user & operator but am receiving a Bad Request 400 error

    "code""BadRequest",
    "message""Invalid OData type specified: \"Microsoft.Teams.GraphSvc.aadUserConversationMember\"",


I've tried using the user ID, emails, manually typing the emails etc.
email format: firstname.lastname@domain.com.au
user ID: obtained through search for users V2

The user, operator & flow connector are all on the same domain so should be able to initiate the chat - I've tried through other flow connector/accounts and having the same issues.

I'd love for this to be a silly mistake and a simple fix! x)

Edit: Someone from my team believes it may be a bug with the 'Create a chat' feature.
Specifically, because it uses the aadConversationMember class requires aadUser or something similar to add the Teams account to the chat. Because it's a new 'conversation' there's currently no conversation members. I've added the 'peak code' below

{
    "inputs": {
        "host": {
            "connectionName""shared_teams",
            "operationId""CreateChat",
            "apiId""/providers/Microsoft.PowerApps/apis/shared_teams"
        },
        "parameters": {
            "item/members""@{outputs(insert-operator-email-here};@{outputs(insert-user-email-here}"
        },
        "authentication""@parameters('$authentication')"
    }
}
1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User II
Super User II

Hi @Nyko@JonBerkowitz & @JayBert,

 

In my dev environment it works again. I am unable to reproduce the issue anymore. Looks like it is fixed.

View solution in original post

16 REPLIES 16
Expiscornovus
Super User II
Super User II

Hi @Nyko,

 

I have also seen this error with this new preview Create a Chat action. I have actually created an issue on GitHub for this:

https://github.com/MicrosoftDocs/BusinessApplicationPlatform-Connectors-public/issues/375

 

I will keep you posted on the progress.

Thanks Expiscornovus! 🙂
It's a definite head scratcher...

JayBert
Frequent Visitor

Did anyone found a solution yet ? got the same error...

JonBerkowitz
New Member

Same issue, hope they fix it soon!

 

Nyko
Frequent Visitor

Nothing yet - frustrating because it could be a great feature!

Expiscornovus
Super User II
Super User II

Hi @Nyko@JonBerkowitz & @JayBert,

 

In my dev environment it works again. I am unable to reproduce the issue anymore. Looks like it is fixed.

View solution in original post

That's great, but for some reason it still doesn't work for me. The "create a chat" still crash my flow
But i got a different error now so i guess it may be fixable now, this is what i got:

 

"code": "BadRequest",
"message": "Exception has been thrown by the target of an invocation., Exception has been thrown by the target of an invocation.",

 



Nyko
Frequent Visitor

Hi Jay - it's working for me now.
I initially got the same error, but it was because the connection/account I was using to action the 'Create a chat' was from a different domain/organisation. Once I switched to a connection on the same domain it worked.

Thanks to everyone that replied & for the Microsoft Fairy's for fixing the issue 🙂

lesawibe
New Member

I have same problem... no matter how much I simplified setup of connector again I have same message. 

Exception has been thrown by the target of an invocation., Exception has been thrown by the target of an invocation.

JayBert
Frequent Visitor

I found a way to fix my problem, i am using a variable to select wich person will be added to the group, i tested by manually inserting them in the field "members to add" and it worked, but when i use a custom variable in that field, i get the invocation exception...

@JayBert , I don't understand how you fixed your issue. I am getting the same exact issue when trying to create a chat in teams

JayBert
Frequent Visitor

@cdigerlando i actually did not fix it, i want to store the "members to add" email in a database and get them using sql server connector with some filtering and create an string with the result and put them inside the field "members to add" but it failed that way, the only way i could make it work is by manually put the email of the member in the field, and it worked like half the time.

@JayBert  Dang ok.. when I add the emails in the "Members to add" field I just get the same error over and over

JayBert
Frequent Visitor

@cdigerlando you could try some different format, i know my organisation use two format, and somehow one was working better than the other. We have 'login@organisation.com'  and 'firstname.lastname@organisation.com' and the one with the login was working better for me.

Nyko
Frequent Visitor

From memory using the users email address didn't work for me either, I used their 'User ID'. Use the 'Search for Users' function & enter the desired usernames email. Then use the 'user ID' output from that function in the create a chat function.

JayBert
Frequent Visitor

I fix my issue, when i was creating my string with the user email, i was putting a ";" at the end of each email. i tried removing the last ";" of my emails string and it worked. i guess that the actions was expecting another email but none was given and he didn't know what to do...

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,203)