Apply or remove mailbox policy on a mailbox in Exchange Online for Outlook on the web and the new Outlook for Windows

Assigning an Outlook on the web mailbox policy to a mailbox controls the Outlook on the web (formerly known as Outlook Web App) and new Outlook for Windows experience for the user. You can apply Outlook on the web mailbox policies to one or more mailboxes or remove the policy assignments in the Exchange admin center (EAC) or Exchange Online PowerShell.

What do you need to know before you begin?

Tip

Having problems? Ask for help in the Exchange forums. Visit the forums at Exchange Online or Exchange Online Protection.

Apply mailbox policies to Outlook on the web and the new Outlook for Windows mailboxes

Use the EAC to apply an Outlook on the web mailbox policy to a mailbox

  1. In the EAC, go to Recipients > Mailboxes.

  2. Do one of the following steps:

    • Select a mailbox and then click Edit Edit icon..

      1. In the properties of the mailbox window that opens, click Mailbox features.

      2. In the Email connectivity section under Outlook on the web: Enabled, click View details.

      3. In the Outlook Web App mailbox policy policy window that opens, click Browse to find and select the policy to apply, and then click OK when you're finished. By default, the default policy named OwaMailboxPolicy-Default is applied.

      4. When you're finished, click Save multiple times.

    • Select multiple mailboxes.

      1. In the Details pane, find Outlook on the web and click Assign a policy.

      2. In the bulk assign window that opens, click Browse to find and select the policy to apply, and then click OK when you're finished.

      3. When you're finished, click Save.

Use Exchange Online PowerShell to apply a mailbox policy to Outlook on the web or the new Outlook or Windows mailboxes

There are three basic methods you can use to apply a mailbox policy to Outlook on the web and the new Outlook for Windows mailboxes:

  • Individual mailboxes: Use the following syntax:

    Set-CasMailbox -Identity <MailboxIdentity> -OwaMailboxPolicy "<Policy Name>"
    

    This example applies the mailbox policy named Sales Associates to tony@contoso.com for Outlook on the web and the new Outlook for Windows.

    Set-CASMailbox -Identity tony@contoso.com -OwaMailboxPolicy "Sales Associates"
    
  • Filter mailboxes by attributes: This method requires that the mailboxes all share a unique filterable attribute. For example:

    • Title, Department, or address information for user accounts as seen by the Get-User cmdlet.

    • CustomAttribute1 through CustomAttribute15 for mailboxes by as seen the Get-Mailbox cmdlet.

    The syntax uses the following two commands (one to identify the mailboxes, and the other to apply the policy to the mailboxes):

    $<VariableName> = <Get-User | Get-Mailbox> -ResultSize unlimited -Filter <Filter>
    
    $<VariableName> | foreach {Set-CasMailbox -Identity $_.MicrosoftOnlineServicesID -OwaMailboxPolicy "<Policy Name>"}
    

    This example assigns the policy named Managers and Executives to all mailboxes whose Title attribute contains "Manager" or "Executive".

    $Mgmt = Get-User -ResultSize unlimited -Filter "(RecipientType -eq 'UserMailbox') -and (Title -like '*Manager*' -or Title -like '*Executive*')"
    
    $Mgmt | foreach {Set-CasMailbox -Identity $_.MicrosoftOnlineServicesID -OwaMailboxPolicy "Managers and Executives"}
    
  • Use a list of specific mailboxes: This method requires a text file to identify the mailboxes. Values that don't contain spaces (for example, the user account) work best. The text file must contain one user account on each line like this:

    akol@contoso.com
    ljohnston@contoso.com
    kakers@contoso.com

    The syntax uses the following two commands (one to identify the user accounts, and the other to apply the policy to those users):

    $<VariableName> = Get-Content "<text file>"
    
    $<VariableName> | foreach {Set-CasMailbox -Identity $_ -OwaMailboxPolicy "<Policy Name>"}
    

    This example assigns the policy named Managers and Executives to the mailboxes specified in the file C:\My Documents\Management.txt.

    $Mgrs = Get-Content "C:\My Documents\Management.txt"
    
    $Mgrs | foreach {Set-CasMailbox -Identity $_ -OwaMailboxPolicy "Managers and Executives"}
    

For detailed syntax and parameter information, see Set-CASMailbox.

How do you know this worked?

To verify that you've applied a mailbox policy to a mailbox for Outlook on the web and the new Outlook for Windows, use any of the following steps:

  • In the EAC, go to Recipients > Mailboxes and select the mailbox. In the Details pane, go to Email Connectivity, click View details, and verify the name of the policy in the Outlook Web App mailbox policy window that appears.

  • In the EAC, go to Recipients > Mailboxes, select the mailbox, and click Edit Edit icon.. In the properties of the mailbox window that opens, click Mailbox features. In the Email connectivity section under Outlook on the web: Enabled, click View details, and verify the name of the policy in the Outlook Web App mailbox policy window that appears.

  • In Exchange Online PowerShell, replace <MailboxIdentity> with the name, alias, email address, or account name of the mailbox, and run the following command to verify the value of the OwaMailboxPolicy property:

    Get-CasMailbox -Identity "<MailboxIdentity>" | Format-List OwaMailboxPolicy
    
  • In Exchange Online PowerShell, run the following command to verify the value of the OwaMailboxPolicy property for all mailboxes:

    Get-CasMailbox -ResultSize unlimited | Format-Table Name,OwaMailboxPolicy -Auto
    

Remove a mailbox policy assignments from mailboxes for Outlook on the web or the new Outlook for Windows

Use the EAC to remove a mailbox policy assignment from a mailbox for Outlook on the web or the new Outlook for Windows

  1. In the EAC, go to Recipients > Mailboxes, and select the mailbox that you want to modify.

  2. Scroll down in the details pane to Email Connectivity and click View details.

    If a mailbox policy has been assigned, click Clear X to remove the policy assignment from the mailbox.

  3. When you're finished, click Save to save.

Use Exchange Online PowerShell to remove a mailbox policy assignment from a mailbox for Outlook on the web and the new Outlook for Windows

To remove the policy assignment from the mailbox, use the following syntax:

Set-CasMailbox -Identity "<MailboxIdentity>" -OwaMailboxPolicy $null

This example removes the mailbox policy from mailbox of the user tony@contoso.com for Outlook on the web and the new Outlook for Windows.

Set-CASMailbox -Identity tony@contoso.com -OwaMailboxPolicy $null

For detailed syntax and parameter information, see Set-CASMailbox.

How do you know this worked?

To verify that you've removed an Outlook on the web mailbox policy assignment from a mailbox, use any of the following steps:

  • In the EAC, go to Recipients > Mailboxes and select the mailbox. In the Details pane, go to Email Connectivity, click View details, and verify the policy is blank in the Outlook Web App mailbox policy window that appears.

  • In the EAC, go to Recipients > Mailboxes. In the properties of the mailbox window that opens, click Mailbox features. In the Email connectivity section under Outlook on the web: Enabled, click View details, and verify the policy is blank in the Outlook Web App mailbox policy window that appears.

  • In Exchange Online PowerShell, replace <MailboxIdentity> with the name, alias, email address, or account name of the mailbox, and run the following command to verify the value of the OwaMailboxPolicy property:

    Get-CasMailbox -Identity "<MailboxIdentity>" | Format-List OwaMailboxPolicy
    
  • In Exchange Online PowerShell, run the following command to verify the value of the OwaMailboxPolicy property:

    Get-CasMailbox -ResultSize unlimited | Format-Table Name,OwaMailboxPolicy -Auto