Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Teams - Create a chat action error: Exception has been thrown by the target of an invocation.

Hi everyone,


i'm having a huge problem with a flow, the one you see in the image:



When I add a member (using a variable or writing the email address) and start the flow it always gives me this error in the Create a chat action:





Anyone know how to fix?


Thank you so much!!


Resolver III
Resolver III

Hi @Vale_2290 
* The user email address is from your organization or outside of your organization?

* What happens, if you set user email address as your email address?

* Have you tried with Manual trigger rather than triggering it from PowerApps?





Hi Murali,


the email address in from my organization.
I've altready tried all your suggestions but i always have the same error.



I tried quickly as you mentioned and it works fine for me. 

The test chat message also posted in the Teams. 

I used Manual trigger and you've used PowerApps trigger. 

Is that possible for you to export the Power Automate and share?








In my development environment it works, I exported the flow to a customer's environment and i have that error.
I tried to post a message as a Bot Flow and it works form my customer. As user it doesn't.
Could it be an authorization error?


I can't export the flow right now. 

Hi @Vale_2290 ,

While importing the Flow into another environment, how you have configured the connection property for Teams?

Please try to create new connection and try . 







Frequent Visitor

I've tried but always got the same error.

New Member

Dear all,

I'm experiencing the same problem and I didn't find any solution. Any update?

New Member

Same problem I am facing, no solution ? maybe how to input email address ???


New Member

Same issue on my side as well, looks like there's a bug with "Create a chat".

New Member

I'm having the same issue.  Tried testing it in different flows.  Any solutions?


I was having exactly the same issue but I managed to fix it. Basically I have a Flow that pulls in a Column of Email Addresses from a Share Point List and then, using a Compose action, creates a long string of the email addresses separated by a semi-colon. The 'Outputs' from the Compose action is then added to the 'Create a Chat' action within the 'Members to add' field;



This kept failing until I took a closer look at the Share Point List I was getting the data from;



Turns out there was a semi colon at the end of one of the email addresses. This meant 2 of the email addresses were separated by ';;' rather than just ';'. When I removed semi colon the Flow worked. Could there possibly be a character somewhere that is affecting your Flow?

New Member

Any update? Same issue here..

Frequent Visitor

I was seeing the same issue today. Here's what I found:

1. Don't include the email address of the connection you're using. For instance if your account is,  then make sure is NOT in the list of email addresses.

2. Don't include an extra semi-colon at the end of the list of invitees. This most likely happens when your concatonating a list of values together to generate an email address string. Update your flow to either NOT add the semi-colon every time, or remove it after you've found everything you want to find.

How to remove email address of the connection from the list of email addresses ?


My case, it's than when I'm in the @To of a typology of mail, i must create a conversation with all people on the @TO 

Thanks by advance


New Member

Our issue was the "Members to add" input needed to be the User Principal Name (UPN) instead of their email address. In our organization they are different. We used the "Get User Profile (V2)" action to retrieve the UPN and used that output to create the chat in the 'Members to add' input.

Thanks, this solved the problem

I was having the same issue as well and it was frustratingly difficult to resolve

But for the sake of other users, I shall attempt to explain.

Depending on your organization's policy, there could be differences in the UPN and email address. 

For the sake of illustration, I'll call

Names as Baba Yaga

Company domain JohnDoeltd


Username: byaga


Many of us have been using email and username but UPN (User Principal Name) works


Resolver III
Resolver III

Thanks for sharing  and definitely it will be helpful for someone. 


Hi Guys Please remove your name (whose trigger the flow) then try it is working

Helpful resources

Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,126)