Multiple email boxes showing up in Outlook client


Some time ago, and I'm not sure this is the cause, I ran a PowerShell script to be me (I'm the IT Admin) access to all the user's mailboxes.  This was so I could "manage another mailbox" from the web email interface to troubleshoot problems, etc.  This all worked fine for months, not that I had to use it much, but if I had to, it worked.


A few days ago, I got an error on my Outlook client which said my .ost file was maxed out.  I looked at it and it was at 49Gb.  I could see no reason for this.  But, when I scrolled down in the left-hand column of the Outlook interface, I saw a list of all the users., then I noticed a message in the status bar "updating <username> email", and the .ost file is starting to grow again.  If I try to get rid of these mailboxes it tells me I need to remove them from Accounts.  Of course, they are not in Accounts, just my address.


Again, I'm not sure if my access to these has anything to do with it as this just started happening and I had done that at least 6 months ago.  I tried deleting the .ost file, but nothing changed.  The web interface shows nothing like this and in fact works fine.


Any idea how I can get rid of these?

5 Replies

@BoxOfFrogs The issue is that you have provide yourself with more permissions than you need. You have assigned yourself. You should run a new scrip that replaces 'Full Access' with 'Send As' or even just read access if you will never need to impersonate one of your users. The problem is that with Exchange Online Autodiscovery adds any mailbox you have 'Full Access' permissions to your Outlook profile. After correcting the permissions I would delete the current profile so the current .ost file is deleted and create a new profile. Once the permissions are changed the existing profile should fix itself but it could take some time for the .ost file to return to a more normal size. This link provides an explanation of the different permission levels.

Just to clarify, the issue is not with the Full Access permissions per se, but the so-called "Auto mapping" flag. This flag is set by default when you grant permissions via the UI, but you can toggle it off when using PowerShell. That said, if you no longer need access to said mailboxes, simply removing the Full Access permissions will do as well. It's best to recreate the Outlook profile after doing that.

@Vasil Michev Thank you.  To clarify what I need.  I get requests from users for Email (Outlook) issues from time to time that are usually resolved best by going into the web interface, the "accessing another users mailbox".  Therefore, I ran the script I did.  I would like to retain the full access, but not have them show up in the client.  The reason I ran the script I found was because it was always difficult to find where, in the GUI, to turn this on and off so I could access a mailbox.  So I guess I would like to try your solution first, remove the "Auto Mapping" flag.  


Is there a PowerShell script to do this or is it somewhere in the Admin portal that can do it?

Unfortunately it's PowerShell only, and technically you need to remove the permissions first, then re-add them. Details are here:


Another approach would be to use the -ClearAutomapping parameter, but that will affect all users that currently have Full Access permissions with Automapping on a given mailbox, not just you. Just in case, here are the details on that:

You should be able to turn off the AutoMapping flag with the following cmdlets.

Get-Mailbox | Remove-MailboxPermission -User MyAccount -AccessRights FullAccess -InheritanceType All
Get-Mailbox | Add-MailboxPermission -User MyAccount - AccessRights FullAccess -InheritanceType All -AutoMapping $False

You may want to filter the Get-Mailbox to return only user mailboxes. From the documentation the Identity parameter is not required if you are piping in the mailboxes. There may be a propagation delay for the permission to take effect. As suggested before you may want to recreate the Outlook profile.

In the cmdlet documentation example 4 shows a very similar assignment.