Set-MailboxFolderPermission

Set-MailboxFolderPermission

You don’t need to share an entire mailbox to grant users access to the contents. With Set-MailboxFolderPermission it’s possible to configure permissions on individual mailbox folders.

This post will show how to modify existing permissions set on an individual folder in a mailbox. If you’re setting up new permissions refer to the Add-MailboxFolderPermission PowerShell command.

In the last section we’ll have a look at how to modify mailbox folder access using OWA or the Outlook client.

Modifying Mailbox Folder Permissions Using PowerShell

As Set-MailboxFolderPermission is only for modifying existing permissions, let’s start by looking at mailbox folder permissions set on the example IoEclipse folder of the mailbox of Ole Roemer:

(the following sample scripts assume you’re connected with PowerShell to Exchange Online)

PS C:\> Get-MailboxFolderPermission -Identity ole.roemer@observatory.dk:\IoEclipse | ft Identity,User,AccessRights Identity User AccessRights -------- ---- ------------ Ole Roemer:\IoEclipse Default {None} Ole Roemer:\IoEclipse Anonymous {None} Ole Roemer:\IoEclipse Hans Schjellerup {Owner}

The user Hans Schjellerup is configured with the Owner role on this folder (look here to get an overview of mailbox roles and permissions).

Let’s say we want to reconfigure his access to Reviewer. This is done using the following PowerShell cmdlet:

  1. Set-MailboxFolderPermission -Identity ole.roemer@observatory.dk:\IoEclipse -User hans.schjellerup@observatory.dk -AccessRights Reviewer

To verify that the permission was changed successfully on the mailbox folder, use the Get-MailboxFolderPermission PowerShell cmdlet one more time:

PS C:\> Get-MailboxFolderPermission -Identity ole.roemer@observatory.dk:\IoEclipse | ft Identity,User,AccessRights Identity User AccessRights -------- ---- ------------ Ole Roemer:\IoEclipse Default {None} Ole Roemer:\IoEclipse Anonymous {None} Ole Roemer:\IoEclipse Hans Schjellerup {Reviewer}

If you accidentally try to use Set-MailboxFolderPermission to modify non-existing permissions you’ll be met with an error message similar to this:

There is no existing permission entry found for user: Hans Schjellerup. + CategoryInfo : NotSpecified: (:) [Set-MailboxFolderPermission], UserNotFoundInPermissionEntryException + FullyQualifiedErrorId : [Server=VI1P189MB0302,RequestId=8f552833-947b-4323-aaae-f1ad1cbb512f,TimeStamp=3/9/2020 8:53:31 AM] [FailureCategory=Cmdlet-UserNotFoundInPermissionEntryException] 66732518,Microsoft.Exchange.Management. StoreTasks.SetMailboxFolderPermission + PSComputerName : outlook.office365.com

To remove the mailbox folder permissions again use the Remove-MailboxFolderPermission PowerShell command:

  1. Remove-MailboxFolderPermission -Identity ole.roemer@observatory.dk:\IoEclipse -User hans.schjellerup@observatory.dk

Modifying Mailbox Folder Permissions Using Outlook (Client & Web)

The procedure to configure mailbox folder permissions using Outlook or OWA is the same no matter if you’re adding new permissions or modifying existing permissions.

You open up Outlook or OWA, right click on the folder, select permissions and then you can edit existing permissions or add new ones:

Add-MailboxFolderPermission

Summary

Hopefully you’re all set to configure mailbox folder permissions using PowerShell, Outlook or OWA?

When using PowerShell make sure to use Add-MailboxFolderPermission to add new permissions and use Set-MailboxFolderPermission to change existing permissions.

If you want more inspiration on PowerShell scripting or Office 365 Management please have a look at our blog.

If you want to save lots of hours on your weekly Office 365 user, mailbox and license administration AND get rid of your on-premise Exchange Server, have a look at Easy365Manager. It’s available as a fully functional 30 day trial.

Did you like this post? Maybe your friends will too!