How do I get rid of all the users mailbox's being loaded into my Outlook client?

Jim 306 Reputation points
2023-11-14T22:17:12.1333333+00:00

A long time ago I had run a PS script to give me (I'm the Admin) access to all the users mailbox's so that I could use the "open another mailbox" option in the Web interface so I could adequately support them. Now, I'm a part time admin to this small company and have my mail forwarded to my Gmail account and read it there. So I rarely use the Outlook client. But some time ago I went into it to work on some issues anther user was having and saw that every user's mail was now in my client. If I try to close them it just tells me to remove the account from the file tab. But there is only one account there, mine. I have tried deleting all the local files and letting it resynch, but they just come back.

Any idea how to get rid of these?

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,194 questions
Outlook | Windows | Classic Outlook for Windows | For business
0 comments No comments
{count} votes

Accepted answer
  1. Adam Zachary 2,936 Reputation points
    2023-11-14T23:54:54.78+00:00

    Hi Jim,

    To remove the additional mailboxes from your Outlook client, you need to change the permissions that were initially set via the PowerShell script. Since you're an admin who had granted yourself access to all user mailboxes, these mailboxes are automatically added to your Outlook profile due to the permission settings.

    Here's a step-by-step guide on how to resolve this:

    1. Revoke Mailbox Permissions:
    • Open the Exchange Management Shell as an administrator.
      • You need to run a PowerShell command to remove your full access permissions from each mailbox. The command typically looks like this:
          Remove-MailboxPermission -Identity [User's Mailbox] -User [Your Admin Account] -AccessRights FullAccess -InheritanceType All
          
          ```
    
       - Replace **`[User's Mailbox]`** with the mailbox identity and **`[Your Admin Account]`** with your admin account.
    
       - If you have a large number of mailboxes, you might want to automate this with a script that iterates over all user mailboxes.
    
    1. **Automate the Process for Multiple Mailboxes:**
    
       - If you want to revoke access for all mailboxes, use a script like this:
    
          
    ```powershell
          Get-Mailbox -ResultSize unlimited | Remove-MailboxPermission -User [Your Admin Account] -AccessRights FullAccess -InheritanceType All -Confirm:$false
          
          ```
    
       - Be careful with this script as it will remove your access to all mailboxes.
    
    **Update Your Outlook Client:**
    
    - Once the permissions are revoked, open your Outlook client.
    
    - The mailboxes might not disappear immediately. To speed up the process, you can restart Outlook or even reboot your computer.
    
    - If the mailboxes still appear, you may need to remove your profile and re-add it:
    
    - Go to Control Panel > Mail > Show Profiles.
    
    - Select your profile and choose “Remove.”
    
    - Click “Add” to create a new profile and then set up your account again.
    
    **Check Auto-Mapping:**
    
    - Auto-mapping might automatically add mailboxes for which you have full access. Ensure that when you remove permissions, auto-mapping is also disabled. This usually is taken care of by the above scripts, but it's good to be aware of it.
    
    **Alternative Method:**
    
    - If you do not wish to use PowerShell or have difficulties with it, you might consider reaching out to Microsoft support or a more experienced IT professional for assistance, especially considering you are a part-time admin.
    
    Remember, modifying mailbox permissions can impact your ability to support users. Ensure that you still have a way to access these mailboxes if needed for administrative purposes. 
    
    Additionally, always verify and double-check PowerShell scripts, especially those affecting multiple users, to prevent unintended consequences.
    
    Hope this answer can help you with your issue.
    
    
    1 person found this answer helpful.

3 additional answers

Sort by: Most helpful
  1. Faery Fu-MSFT 19,751 Reputation points Moderator
    2023-11-15T06:15:33.1966667+00:00

    Hi @Jim ,

    If shared mailbox account not visible in Advance tab, it should be added in your Outlook with automapping feature. When we have full access permission on shared email account and if automapping is enable, then it will be automatically added in user’s Outlook. In such situation, to remove shared email account in the client, you need to disable permission first and need re-assign permission with disable automapping.

    1. Connect to Exchange Online PowerShell.
    2. Remove the user's full access permission from the mailbox.
    3. Grant full access permissions back to the user on the mailbox with automapping disabled.

    For details, please check Remove automapping for a shared mailbox - Outlook | Microsoft Docs.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

  2. Adam Zachary 2,936 Reputation points
    2023-11-15T02:25:56.1066667+00:00

    Hi Jim,

    I misunderstood your question.

    If you want to maintain access to user mailboxes but prevent the automatic downloading of all emails to their local Outlook client, here's a potential solution:

    You can use online Mode in Outlook. By default, Outlook operates in Cached Exchange Mode, which downloads mailbox data to the local computer. However, you can switch to "Online Mode," which allows you to access mailbox data directly from the server without storing it locally. Here's how to do it:

    • Open Outlook.
      • Click on "File."
        • Click on "Account Settings" and then "Account Settings" again.
          • Select your email account and click "Change."
            • Under "Use Cached Exchange Mode," uncheck the box.
              • Click "Next" and then "Finish" to save the changes.
              Keep in mind that with Online Mode, accessing emails may be slower because it's fetching data from the server in real-time. However, it should prevent the excessive local storage usage.
    0 comments No comments

  3. Jim 306 Reputation points
    2023-11-20T12:56:25.0566667+00:00

    Thank you. This solved the problem

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.