Skip to Content
Communication Square LLC Help Center

Get owner of MSOL Groups (Security, Distribution List, MailEnabledSecurity)

Written October 2020. Microsoft changes these admin screens often, so the screenshots below may not match what you see today. The sequence of steps is usually still correct — if something looks wrong, tell us and we'll update it.

Description:

This script is used to get owner (Managed by property) of the Office 365 Groups.

-You can change the value of Grouptype

-Security 

-Distribution List

-MailEnabledSecurity

You will get output something like that:

Script:

Install-Module -Name AzureAD

Connect-AzureAD

Install-Module -Name Msonline

Connect-MsolService

Get-MsolGroup -GroupType Security | select DisplayName,@{n="ManagedBy";e={(Get-MsolUser -ObjectId (Get-MsolGroup -ObjectId $_.ObjectId).ManagedBy).UserPrincipalName}}

Last updated on