Powershell – How to use Get-MailboxFolderPermission with an Office365 Group

exchangemicrosoft-office-365office365powershell

I'm trying to figure out how to use Get-MailboxFolderPermission for an Office365 group when connnected via powershell.

If I run:

Get-MailboxFolderStatistics -Identity groupname | ft Name, Identity, folderpath, foldertype

I see (among others) a folder named Calendar with identity groupname\Calendar, path /Calendar, and type Calendar.

When I try to view this calendar via:

Get-MailboxFolderPermission -Identity groupname:\calendar

it tells me the specified mailbox "groupname" doesn't exist.

I've also tried specifying the identity as domain\groupname:\calendar and as groupname@domain:\calendar. I imagine I have to specify the identity differently but all three formats work fine with usernames and Get-MailboxFolderPermission. Get-MailboxFolderStatistics accepts both user and group names in all three formats.

How do I use Get-MailboxFolderPermissions to view the calendar that Get-MailboxStatistics says exists?

Best Answer

To understand why this works with your "Office 365" groups and fails with a "Distribution Group" (Also called a Distribution List now) you need to first understand the difference between the two.

Office 365 Groups
This is one of the newer features in Office 365. This basically combines a few features and is also used by Microsoft teams. An Office 365 group has its own Mailbox, so when you use the command on an Office 365 group it will return the MailboxFolderPermission for this groups mailbox, not people who are a member and uses this Office 365 Group.

Distribution Group
A distribution group is a list of recipients that you wish to receive email.
A distribution group has an email alias, but no mailbox, when you send email to a group, it sends the email on to all members of the group.

The soulution
If you want to get the statistics for each member of a Distribution Group, you need to get the mailbox of all members of your distribution group, then pipe that to your folder statistics command.