08 6165 8815 info@techpros.com.au

Office 365 Automapping

What is Office 365 Automapping?

Office 365 Automapping, as the name suggests, automatically maps a shared mailbox that you have permission to, to your mailbox in Outlook. So for example if your mailbox is john.smith@microsoft.com, and you have been given permission to view sales@microsoft.com, next time you open Outlook, you will automatically see the sales mailbox present. For the most part this is great.  It saves you having to follow steps to manually add the mailbox, but there are scenarios in which this isn’t the best way of doing things, and you might want to turn Office 365 Automapping off.  This however is not as simple as you might think, and probably the reason you have come across this post.  Keep reading to see how we can turn off Office 365 Automapping.

What is the problem with Office 365 Automapping?

Outlook basically stores your entire mailbox in a single file.  This is called an OST file.  As you can imagine, if you have all of your emails, attachments, calendar etc in one file, the file can get very large.  Microsoft recommends that this file should never be allowed to get over 50GB, and the default setting in Office 365, prohibits sending messages from mailboxes over the 50GB threshold.  What Office 365 automapping does, is includes all emails, attachments, calendar, etc from the shared mailbox, into the same OST file as your primary mailbox, which can make the OST file grow massively in a short space of time.  Not only will this get you to the 50GB limit much quicker, but your entire Outlook will start having performance issues as it gets larger.  And I’m guessing that’s exactly why you’re reading this article in the first place! So how do we fix it?  Well the goal is to separate the shared mailbox OST file from the primary mailbox OST file.  To do that we need to remove permissions from the mailbox using powershell, manually remove the mailbox from our Outlook, reinstate the permissions with Office 365 automapping disabled, and manually add the shared mailbox back as a new email address.

Disable Office 365 Automapping

The steps involved here are as follows.  We will go through each one in detail.
  1. Connect PowerShell to your Office 365 Email Exchange
  2. Remove Permissions for the user from the shared mailbox
  3. Delete the shared mailbox from Outlook
  4. Reinstate permissions to the mailbox, with Office 365 Automapping disabled
  5. Add the shared mailbox back to Outlook as a separate email address

1. Connect Powershell to your Office 365 Email Exchange.

For the basics on using PowerShell for Office 365, start here: Getting Started with Office 365 PowerShell Or simply follow these specific instructions:
  • Open Powershell – Click Start, type PowerShell and click the option for Windows PowerShell
  • To load your Office 365 credentials into a variable, type the following command, noting you must enter administrator credentials when prompted: $Credential = Get-Credential
  • Next, connect to exchange on your tenancy with this command: $ExchangeSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri “https://outlook.office365.com/powershell-liveid” -Credential $credential -Authentication “Basic” -AllowRedirection
  • Next, import that connection into PowerShell: Import-PSSession $ExchangeSession
  • To test your connection, type Get-Mailbox and press enter. If you see a list of all your mailboxes, you have connected correctly.

2. Remove Permissions for the user from the shared mailbox

  • Use the following command to remove the permissions.  sales@ is the shared mailbox, and john.smith@ is the users mailbox.  Make sure Outlook is closed before you run this command. Remove-MailboxPermission -Identity sales@microsoft.com -User john.smith@microsoft.com -AccessRights FullAccess
  • Type Y and press enter when prompted.

3. Delete the shared mailbox from Outlook

  • Open up Outlook again.  You should still see the shared mailbox heading, but if you have done everything correctly, you will not be able to see the folders, since we have removed the permissions.
  • Click File, Account Settings.  Highlight the primary mailbox, and click Change, and then More Settings.  Under the Advanced tab, you should see your shared mailbox listed.  Highlight it and click Remove.
  • Close Outlook.

4. Reinstate permissions to the mailbox, with Office 365 Automapping disabled

  • Back in PowerShell, type the following command to add the permissions back to the mailbox, with Office 365 Automapping disabled. Add-MailboxPermission -Identity sales@microsoft.com -User john.smith@microsoft.com -AccessRights FullAccess -AutoMapping:$false

5. Add the shared mailbox back to Outlook as a separate email address

  • To add the mailbox back, open Outlook again.
  • Click File, Account Settings.  Under the Email tab, click New.
  • In the new email window, enter the shared mailbox name and email address.  You can leave the password fields blank.
  • Click Next, and it should connect to Office 365 to get the details.
  • You will be prompted to enter credentials.  These will be the Users credentials (email address and password) that has permission to the mailbox.  Click the box to remember password.
  • Click next until all windows are closed.
  • Close and reopen Outlook.
  • Outlook will now download a copy of that mailbox (which may take a while) to a new OST file, and performance should be noticeably improved.