List channels and their email addresses

%3CLINGO-SUB%20id%3D%22lingo-sub-290396%22%20slang%3D%22en-US%22%3EList%20channels%20and%20their%20email%20addresses%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-290396%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHi%20everyone%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDoes%20anyone%20know%20how%20I%20can%20list%20the%20channels%20in%20a%20team%20and%20their%20email%20addresses%20using%20powershell.%3C%2FP%3E%0A%3CP%3EThe%20Get-TeamChannel%20does%20not%20seem%20to%20have%20too%20many%20options.%3C%2FP%3E%0A%3CP%3EThank%20you.%3C%2FP%3E%0A%3CP%3EMatei%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-290396%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-290405%22%20slang%3D%22en-US%22%3ERe%3A%20List%20channels%20and%20their%20email%20addresses%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-290405%22%20slang%3D%22en-US%22%3E%3CP%3EWith%20current%20Teams%20PowerShell%20module%2C%20that's%20not%20possible.%20Let's%20hope%20to%20get%20this%20feature%20in%20next%20updates%20of%20Teams%20PS%20module.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20Unifiedgroup%20cmdlets%20from%20Exchange%20Online%20module%20also%20cannot%20be%20used%20to%20get%20channel%20information.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECheers%2C%3C%2FP%3E%3CP%3EH.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-697510%22%20slang%3D%22en-US%22%3ERe%3A%20List%20channels%20and%20their%20email%20addresses%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-697510%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F244256%22%20target%3D%22_blank%22%3E%40a-matudo%3C%2FA%3E%2C%3C%2FP%3E%3CP%3Eas%20far%20as%20I%20know%20the%20only%20way%20to%20get%20email%20address%20of%20channel%20is%20to%20use%20GRAPH%3C%2FP%3E%3CP%3E1)%20get%20the%20team%20groups%3A%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fbeta%2Fgroups%3F%24filter%3DresourceProvisioningOptions%2FAny(x%3Ax%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fbeta%2Fgroups%3F%24filter%3DresourceProvisioningOptions%2FAny(x%3Ax%3C%2FA%3E%20eq%20'Team')%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E2)get%20id%20of%20each%20group%20and%20run%20the%20following%20request%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fbeta%2Fgroups%2F%257bid%257daf2423a4-b48f-40ca-9d24-804f46383404%2Fchannels%3F%24filter%3Dendswith(email%2C'teams.ms')%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fbeta%2Fgroups%2F%7Bid%7D%2Fchannels%3F%24filter%3Dendswith(email%2C'teams.ms')%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3CSPAN%3Eand%20%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3Bget%20email%20address%20of%20the%20channel%20from%20the%20response.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3ELet%20me%20know%20if%20you'll%20find%20more%20elegant%20way%20to%20do%20the%20same.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3ERegards%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EVictor%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1187798%22%20slang%3D%22en-US%22%3ERe%3A%20List%20channels%20and%20their%20email%20addresses%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1187798%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F100937%22%20target%3D%22_blank%22%3E%40Victor%20Ivanidze%3C%2FA%3E%26nbsp%3BI%20havent%20been%20able%20to%20get%20this%20to%20work.%20Can%20you%20give%20a%20screenshot%20or%20more%20info%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1188408%22%20slang%3D%22en-US%22%3ERe%3A%20List%20channels%20and%20their%20email%20addresses%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1188408%22%20slang%3D%22en-US%22%3EWhat%20exactly%20did%20not%20work%3F%20Please%20describe%20in%20details.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1221962%22%20slang%3D%22en-US%22%3ERe%3A%20List%20channels%20and%20their%20email%20addresses%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1221962%22%20slang%3D%22en-US%22%3E%3CP%20data-unlink%3D%22true%22%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F370720%22%20target%3D%22_blank%22%3E%40dj562006%3C%2FA%3E%26nbsp%3BI%20got%20it%20to%20work%20by%20changing%20'groups'%20to%20'teams'%20e.g.%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fbeta%2Fteams%2F%3CID%3E%2Fchannels%3F%24filter%3Dendswith(email%2C'teams.ms'%26nbsp%3Band%26nbsp%3Bit%3C%2FID%3E%3C%2FA%3E%20works%20a%20treat!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1252238%22%20slang%3D%22en-US%22%3ERe%3A%20List%20channels%20and%20their%20email%20addresses%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1252238%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F265827%22%20target%3D%22_blank%22%3E%40crabduck%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F100937%22%20target%3D%22_blank%22%3E%40Victor%20Ivanidze%3C%2FA%3E%26nbsp%3BI%20am%20new%20to%20using%20Graph%20so%20its%20likely%20I%20am%20doing%20something%20wrong.%20Could%20you%20post%20a%20couple%20screenshots%3F%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1306683%22%20slang%3D%22en-US%22%3ERe%3A%20List%20channels%20and%20their%20email%20addresses%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1306683%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F370720%22%20target%3D%22_blank%22%3E%40dj562006%3C%2FA%3E%2C%20please%20email%20me%20directly%3A%20viciva(at)yahoo.com%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Microsoft

 

Hi everyone,

 

Does anyone know how I can list the channels in a team and their email addresses using powershell.

The Get-TeamChannel does not seem to have too many options.

Thank you.

Matei

7 Replies
Highlighted

With current Teams PowerShell module, that's not possible. Let's hope to get this feature in next updates of Teams PS module. 

 

The Unifiedgroup cmdlets from Exchange Online module also cannot be used to get channel information.

 

Cheers,

H.

Highlighted

Hello @a-matudo,

as far as I know the only way to get email address of channel is to use GRAPH

1) get the team groups:

https://graph.microsoft.com/beta/groups?$filter=resourceProvisioningOptions/Any(x:x eq 'Team')

 2)get id of each group and run the following request:

 https://graph.microsoft.com/beta/groups/{id}/channels?$filter=endswith(email,'teams.ms')

 and  get email address of the channel from the response.

Let me know if you'll find more elegant way to do the same.

 

Regards,

Victor

 

Highlighted

@Victor Ivanidze I havent been able to get this to work. Can you give a screenshot or more info?

Highlighted
What exactly did not work? Please describe in details.
Highlighted

@dj562006 I got it to work by changing 'groups' to 'teams' e.g. https://graph.microsoft.com/beta/teams/<id>/channels?$filter=endswith(email,'teams.ms' and it works a treat!

Highlighted

@crabduck @Victor Ivanidze I am new to using Graph so its likely I am doing something wrong. Could you post a couple screenshots? 

Hi @dj562006, please email me directly: viciva(at)yahoo.com