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%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%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%3CLINGO-SUB%20id%3D%22lingo-sub-1608579%22%20slang%3D%22en-US%22%3ERe%3A%20List%20channels%20and%20their%20email%20addresses%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1608579%22%20slang%3D%22en-US%22%3E%3CP%3EI'd%20like%20to%20say%20that%20there%20exists%20a%20tool%20named%20%3CA%20href%3D%22https%3A%2F%2Fwww.ivasoft.com%2Fchanneladdresses.shtml%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EChannelAddresses%3C%2FA%3E.%3C%2FP%3E%3CP%3EThis%20tool%20allows%20an%20Office%20365%20admin%20to%20create%20as%20many%20mail%20contacts%20as%20many%20mail-enabled%20channels%20exist%20in%20organization.%20Each%20mail%20contact%20has%20an%20external%20email%20address%20of%20team%20and%20additional%20custom%20branded%20email%20address%20(%3CTC_%3E).%3C%2FTC_%3E%3C%2FP%3E%3CP%3EAlso%20ChannelAddresses%20can%20create%20a%20special%20address%20list%20that%20contains%20all%20these%20contacts.%20You%20can%20name%20the%20address%20list%20as%20you%20like.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1744320%22%20slang%3D%22de-DE%22%3ERe%3A%20List%20channels%20and%20their%20email%20addresses%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1744320%22%20slang%3D%22de-DE%22%3E%3CP%3EStrangely%20I%20do%20get%20all%20the%20channels'%20information%20but%20not%20the%20email%20address.%20It's%20empty.%20Does%20anybody%20have%20an%20idea%20what%20this%20is%20caused%20by%3F%3C%2FP%3E%3CP%3EI%20used%20the%20script%20from%20%3CA%20href%3D%22https%3A%2F%2Fgallery.technet.microsoft.com%2FTeams-and-channel-email-9aca757b%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgallery.technet.microsoft.com%2FTeams-and-channel-email-9aca757b%3C%2FA%3E%20and%20the%20instructions%20from%20%3CA%20href%3D%22https%3A%2F%2Fwww.reddit.com%2Fr%2FPowerShell%2Fcomments%2Ff0jex0%2Fis_there_a_way_to_get_microsoft_team_channel%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.reddit.com%2Fr%2FPowerShell%2Fcomments%2Ff0jex0%2Fis_there_a_way_to_get_microsoft_team_channel%2F%3C%2FA%3E%3C%2FP%3E%3CP%3EUnfortunately%20in%20the%20technet%20gallery%20you%20cannot%20post%20any%20questions%20anymore%20and%20the%20redit%20is%20already%20archived.%3C%2FP%3E%3CP%3ECan%20anybody%20help%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1748429%22%20slang%3D%22en-US%22%3ERe%3A%20List%20channels%20and%20their%20email%20addresses%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1748429%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%2F819789%22%20target%3D%22_blank%22%3E%40DMiurge%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ecould%20you%20please%20show%20what%20you%20get%20after%20executing%26nbsp%3B%3CSPAN%3EGet-UnifiedGroup%20%3F%3C%2FSPAN%3E%26nbsp%3B%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

10 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.

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

Highlighted

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

Highlighted

I'd like to say that there exists a tool named ChannelAddresses.

This tool allows an Office 365 admin to create as many mail contacts as many mail-enabled channels exist in organization. Each mail contact has an external email address of team and additional custom branded email address (<TC_{ChannelName}_{TeamName}@{yourdomain}>).

Also ChannelAddresses can create a special address list that contains all these contacts. You can name the address list as you like.

 

Highlighted

Strangely I do get all the channels' information but not the email address. It is empty. Does anybody has an idea what this is caused by?

I used the script from https://gallery.technet.microsoft.com/Teams-and-channel-email-9aca757b and the instructions from https://www.reddit.com/r/PowerShell/comments/f0jex0/is_there_a_way_to_get_microsoft_team_channel/

Unfortunately in the technet gallery you cannot post any questions anymore and the redit is already archived.

Can anybody help?

Highlighted

Hi @DMiurge,

 

could you please show what you get after executing Get-UnifiedGroup ?