{"id":6295,"date":"2020-04-20T12:50:14","date_gmt":"2020-04-20T17:50:14","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=6295"},"modified":"2020-04-20T12:50:14","modified_gmt":"2020-04-20T17:50:14","slug":"did-you-know-you-can-list-the-members-of-your-ms-team","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=6295","title":{"rendered":"Did you know &#8230; you can list the members of your MS Team?"},"content":{"rendered":"<p>Without any special Administrative rights, you can list the members of the Azure AD groups that are used in MS Teams. If you don&#8217;t already have the AzureAD module installed, install it. In Windows, this is:<\/p>\n<div>\n<div>\n<pre><span class=\"cm-line\"><span class=\"cm-identifier\">Install-Module<\/span> <span class=\"cm-operator\">-<\/span><span class=\"cm-identifier\">Name<\/span> <span class=\"cm-identifier\">AzureAD<\/span><\/span><\/pre>\n<\/div>\n<\/div>\n<div>\n<p>In Linux,you&#8217;ll need the preview of Azure AD:<\/p>\n<div>\n<pre><span class=\"cm-line\"><span class=\"cm-comment\"># To run on Linux, you need the preview mode of AzureAD<\/span>\r\n<\/span><span class=\"cm-line\"><span class=\"cm-comment\">Register-PackageSource -Trusted -ProviderName 'PowerShellGet' -Name 'Posh Test Gallery' -Location https:\/\/www.poshtestgallery.com\/api\/v2\/<\/span>\r\n<\/span><span class=\"cm-line\"><span class=\"cm-comment\">Install-Module -Name AzureAD.Standard.Preview<\/span>\r\n<\/span><span class=\"cm-line\">\u00a0<\/span><\/pre>\n<\/div>\n<p>Connect to AzureAD. There is a separate command to list the group owners (Get-AzureADGroupOwner). I&#8217;ve always found the owner(s) in the member list as well, but it&#8217;s technically possible to have entries unique to the owner list.<\/p>\n<\/div>\n<pre>Connect-AzureAD\r\nGet-AzureADGroup -SearchString \"Group Name Here\" | Get-AzureADGroupOwner -All $True\r\nGet-AzureADGroup -SearchString \"Group Name Here\" | Get-AzureADGroupMember -All $True<\/pre>\n<p>Redirect the output to a file if you wish to use the results elsewhere, or stash the returned member list in a variable and use Get-AzureADUser to get additional information for the user records.<\/p>\n<pre>$objMembers | ForEach-Object -Process {get-azureaduser -objectid $_.ObjectID}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Without any special Administrative rights, you can list the members of the Azure AD groups that are used in MS Teams. If you don&#8217;t already have the AzureAD module installed, install it. In Windows, this is: Install-Module -Name AzureAD In Linux,you&#8217;ll need the preview of Azure AD: # To run on Linux, you need the &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[677],"tags":[691,729,666,686,265,705,622,665],"class_list":["post-6295","post","type-post","status-publish","format-standard","hentry","category-office-365","tag-microsoft-office","tag-microsoft-office-365","tag-microsoft-teams","tag-ms-teams","tag-office-365","tag-office365","tag-powershell","tag-teams"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/6295","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6295"}],"version-history":[{"count":1,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/6295\/revisions"}],"predecessor-version":[{"id":6296,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/6295\/revisions\/6296"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}