SOLVED

Export list of all users from a group chat

Brass Contributor

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

5 Replies
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-c...

@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. :p

 

@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?

best response confirmed by Roli307 (Brass Contributor)
Solution

@FrustrationTeams1012 @Roli307 

 

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) open Teams in browser and get the chat ID from the URL (e.g. 19:b8577894a63548969c5c92bb9c80c5e1@thread.v2)

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.

Thanks @jmizin - it works. You rock! :smile:

1 best response

Accepted Solutions
best response confirmed by Roli307 (Brass Contributor)
Solution

@FrustrationTeams1012 @Roli307 

 

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) open Teams in browser and get the chat ID from the URL (e.g. 19:b8577894a63548969c5c92bb9c80c5e1@thread.v2)

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.

View solution in original post