Forum Discussion
Export list of all users from a group chat
Greetings
I have created a Teams group chat with 100 people.
Now I have decided to create a Teams channel and move the discussion.
How do I add all people from the old Teams group chat to the new Teams without having to manually lookup on the old group chat and invite them on the new Teams channel? I was wondering if there is a PowerShell to extract the email of all group chat users into a .csv. Later I can simply automatically use PowerShell to add them to the Teams.
Any other creative solution is appreciated
Hello!
An old topic, but perhaps someone (like me) will come across it, ask themselves the same question and want a simple ready-made answer.
So, what worked for me was:
1) right click on a message from the group chat and select "copy link", then paste it to notepad and extract the Chat ID (e.g. 19:b8577894a63548969c5c92bb9c80c5e1@thread.v2)
(as described here: https://answers.microsoft.com/en-us/msteams/forum/all/get-chat-id-in-new-teams/dd9788d3-1f5a-4da4-9fc8-cc3f35f03dba )2) go to https://developer.microsoft.com/en-us/graph/graph-explorer and sign in
3) use the command as posted by @Vasil Michev (just paste the HTTPS part): https://graph.microsoft.com/beta/chats/19:b8577894a63548969c5c92bb9c80c5e1@thread.v2?$expand=members
4) copy the response to Excel and post-process it to get the members' names, e.g. using INDEX to list every 12-th row content (with the names) and MID or SUBSTITUTE to get just the name without the "displayName" part.
7 Replies
- rahul_tripathiCopper Contributor
Roli307 Try scheduling a "test" meeting, send invite for a moment and now you can copy all the participants from Invite and later cancel the meeting.
That's the easiest way to do that. 😛
- FrustrationTeams1012Copper Contributor
rahul_tripathi Is there a way to do this yet? The suggestion listed of sending a test call isn't an option when dealing with officers/leadership. Seems like a frequent question I see posted, but no organic answer..just APIs, questionable .exe files or test calls. Seems like a rudimentary function, but I've spent hours attempting and investigating. Does anyone have a solution?
- jmizinCopper Contributor
Hello!
An old topic, but perhaps someone (like me) will come across it, ask themselves the same question and want a simple ready-made answer.
So, what worked for me was:
1) right click on a message from the group chat and select "copy link", then paste it to notepad and extract the Chat ID (e.g. 19:b8577894a63548969c5c92bb9c80c5e1@thread.v2)
(as described here: https://answers.microsoft.com/en-us/msteams/forum/all/get-chat-id-in-new-teams/dd9788d3-1f5a-4da4-9fc8-cc3f35f03dba )2) go to https://developer.microsoft.com/en-us/graph/graph-explorer and sign in
3) use the command as posted by @Vasil Michev (just paste the HTTPS part): https://graph.microsoft.com/beta/chats/19:b8577894a63548969c5c92bb9c80c5e1@thread.v2?$expand=members
4) copy the response to Excel and post-process it to get the members' names, e.g. using INDEX to list every 12-th row content (with the names) and MID or SUBSTITUTE to get just the name without the "displayName" part.
- PowerShell won't help you here, but you can use a Graph API query to list all participants: https://docs.microsoft.com/en-us/graph/api/chat-get?view=graph-rest-beta&tabs=http#example-3-get-a-chat-and-all-its-members