When someone sends an email from a shared mailbox in Microsoft 365, the sent email saves to their personal Sent folder instead of the shared mailbox's Sent folder. This makes it hard for the team to see what emails have been sent from the shared mailbox. Fortunately, there's a PowerShell setting that fixes this issue.
This guide walks you through configuring your shared mailbox so that sent emails automatically save to the shared mailbox's Sent folder, making email communication visible to everyone with access to that shared mailbox.
TL;DR
- The Problem: Emails sent from shared mailboxes save to the sender's personal Sent folder, not the shared Sent folder
- The Solution: Run two PowerShell commands to enable
MessageCopyForSentAsEnabledandMessageCopyForSendOnBehalfEnabled - Requirements: Windows computer, Microsoft 365 admin access, about 5 minutes
- Key Commands: Install ExchangeOnlineManagement module, connect to Exchange Online, then set the two mailbox properties
- Note: Emails will save to both the shared Sent folder AND the sender's personal Sent folder
The Problem
By default, Microsoft 365 shared mailboxes have a limitation: when a user sends an email from the shared mailbox, that email only appears in the sender's personal Sent folder. This creates several issues:
- Team members can't see what emails have been sent from the shared mailbox
- There's no centralized record of outgoing communications
- It's difficult to audit email activity for compliance purposes
- New team members can't review previous communications from the shared mailbox
This behavior is due to how Microsoft 365 handles email delegation. When users have "Send As" or "Send On Behalf Of" permissions on a shared mailbox, their individual sent settings take precedence.
The Solution
Microsoft provides two PowerShell settings that address this issue:
- MessageCopyForSentAsEnabled: Copies emails sent using "Send As" permissions to the shared mailbox Sent folder
- MessageCopyForSendOnBehalfEnabled: Copies emails sent using "Send On Behalf Of" permissions to the shared mailbox Sent folder
Enabling these settings ensures that all emails sent from the shared mailbox are visible to everyone with access to it, while still preserving copies in the sender's personal Sent folder for their records.
What You Need
- A computer with Windows
- Admin access to your Microsoft 365 account
- About 5 minutes
Step-by-Step Instructions
Step 1: Open PowerShell
Click the Start menu and type PowerShell. Right-click on Windows PowerShell and select Run as Administrator.
You'll see a command prompt window that starts with PS C:\Windows\system32> or similar.
Step 2: Install the Exchange Online Tool
Copy and paste this command into PowerShell and press Enter:
Install-Module -Name ExchangeOnlineManagement
If it asks you to confirm, type Y and press Enter. This installs the PowerShell module needed to manage Microsoft 365 Exchange settings. The installation may take a minute or two.
Step 3: Connect to Microsoft 365
Copy and paste this command and press Enter:
Connect-ExchangeOnline
A browser window will open. Sign in with your Microsoft 365 admin account. Once you're signed in, you can close the browser window and return to PowerShell.
Step 4: Change the Setting
Copy and paste these two commands one at a time. Replace [email protected] with your actual shared mailbox email address. Press Enter after each command:
Set-Mailbox "[email protected]" -MessageCopyForSentAsEnabled $true
Set-Mailbox "[email protected]" -MessageCopyForSendOnBehalfEnabled $true
These commands enable the settings that copy sent emails to the shared mailbox Sent folder.
Step 5: Verify It Worked
Copy and paste this command to confirm the settings changed:
Get-Mailbox "[email protected]" | FL MessageCopyForSentAsEnabled, MessageCopyForSendOnBehalfEnabled
You should see output that shows:
MessageCopyForSentAsEnabled : True
MessageCopyForSendOnBehalfEnabled : True
If both show True, the settings have been applied successfully.
Step 6: Disconnect
Copy and paste this command to log out:
Disconnect-ExchangeOnline -Confirm:$false
This closes your connection to Microsoft 365.
What to Expect
After making these changes, emails sent from the shared mailbox will now appear in both places:
- The shared mailbox's Sent folder (visible to all team members with access)
- The sender's personal Sent folder (visible only to that individual)
This is the expected behavior and provides the best of both worlds: the team can see all outgoing communications from the shared mailbox, while individual senders still have a copy in their personal Sent folder for their records.
Troubleshooting
If You Get an Error
Error: "Access Denied"
Make sure you're using an account with admin permissions in Microsoft 365. The account needs to have Exchange Administrator or Global Administrator rights. If you're unsure about your permissions, contact your IT department.
Error: "The user or mailbox doesn't exist"
Double-check that you've entered the shared mailbox email address correctly. It's case-sensitive in some contexts, so make sure the spelling is exact.
Module not found
If the module installation fails, try running PowerShell again as Administrator and re-run the Install-Module command. You may need to set your execution policy first:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
For Multiple Shared Mailboxes
If you have multiple shared mailboxes to configure, you can apply the setting to all of them at once. Use this command instead:
Get-Mailbox -RecipientTypeDetails SharedMailbox | Set-Mailbox -MessageCopyForSentAsEnabled $true -MessageCopyForSendOnBehalfEnabled $true
This applies the settings to every shared mailbox in your Microsoft 365 organization.
Summary
Configuring shared mailbox sent folder settings in Microsoft 365 is a straightforward process that takes just a few minutes. By enabling the MessageCopyForSentAsEnabled and MessageCopyForSendOnBehalfEnabled settings via PowerShell, you ensure that all emails sent from your shared mailbox are visible to your team, improving communication transparency and making it easier to track shared mailbox activity.
This change doesn't require any reconfiguration of user mailboxes or Outlook settings—it works automatically once the PowerShell commands are applied.
Related Articles:
← System Administration Best Practices