Home

Exploiting the Graph When PowerShell Can’t Do Enough for Teams

%3CLINGO-SUB%20id%3D%22lingo-sub-834394%22%20slang%3D%22en-US%22%3EExploiting%20the%20Graph%20When%20PowerShell%20Can%E2%80%99t%20Do%20Enough%20for%20Teams%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-834394%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAlthough%20Teams%20has%20a%20PowerShell%20module%2C%20its%20cmdlets%20can't%20get%20at%20some%20of%20the%20interesting%20information%20for%20team%20objects.%20But%20the%20Graph%20API%20reveals%20that%20information.%20Combining%20the%20Graph%20with%20PowerShell%20makes%20it%20possible%20to%20retrieve%20the%20information%20with%20just%20a%20little%20effort.%20A%20working%20example%20helps%20make%20the%20point%2C%20so%20here's%20a%20script%20to%20report%20the%20Teams%20channels%20with%20email%20addresses.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.petri.com%2Fexploiting-graph-when-powershell-teams%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.petri.com%2Fexploiting-graph-when-powershell-teams%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-834394%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
Tony Redmond
MVP

 

Although Teams has a PowerShell module, its cmdlets can't get at some of the interesting information for team objects. But the Graph API reveals that information. Combining the Graph with PowerShell makes it possible to retrieve the information with just a little effort. A working example helps make the point, so here's a script to report the Teams channels with email addresses.

 

https://www.petri.com/exploiting-graph-when-powershell-teams

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
50 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
32 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
15 Replies
Dev channel update to 80.0.355.1 is live
josh_bodner in Discussions on
67 Replies