SOLVED

Power Automate: Post a message when a new member is added to the Team

Iron Contributor

Has anyone tried this flow? I've added it to my test team but the message output is directed to the object id associated with the user. See the attached file for clarity.

9 Replies

You'll need to utilize a get user action from the Azure AD connector and pass that ID to it, then you can return the users display name into the message body and you should be good to go.

Updated reply, thought you could pass User ID to the Office 365 users connector, but you can pass ID to azure AD connector, then return display name. So add that in between your first step there and pass the userid then you can use Display Name from that step in your message body.

@Chris Webb Thank you. I will give that a go. This flow was documented in one of the "what's new in M365" videos and it's also listed as a template on Power Automate so thought it should work as expected without me having to change anything.

@Chris Webb I managed to get it to post the display name but it does not mention the user. Adding the @ sign does not improve the situation. 

best response confirmed by SuleimanDC (Iron Contributor)
Solution
You have to use one of the other actions that say mention a user instead of post the a message action.

Thanks @Chris Webb it's working as expected now. 

@SuleimanDC 

I tried this flow today and it works, just seems to be a little slow to respond.

Does anyone have a suggestion on how to set up a flow that would post only 1 welcome message for multiple new members? 

Currently it will post 1 welcome message per member added.

Yeah, create a list on the SharePoint site to hold the new members information you want to post, if it's just their name, then you could just store that. Have the flow run each member add to add to the list. Then Have another flow on a 1 week schedule that Reads the list data and forms the message post into the Team from that.

You would have to loop through each item in the list, and in that loop get the @mention tokens to use in your message if you want to mention those individuals. Then post the message using the generated data elements and then remove the individuals from the list.

But overall that's how you would accomplish that.

@Chris Webb 

Thank you Sir, I'll give that a go

1 best response

Accepted Solutions
best response confirmed by SuleimanDC (Iron Contributor)
Solution
You have to use one of the other actions that say mention a user instead of post the a message action.

View solution in original post