How to Set All Microsoft 365 User Calendars to Hide Details via PowerShell
Question details
The administrator needs to apply a tenant-wide setting to hide calendar event details for all users across the organization.

- Product
- Microsoft 365 (Exchange Online)
- Device & OS
- not provided
- Scenario
- A global administrator wants to restrict internal users from viewing each other's calendar details by changing the default shared calendar permissions.
- Observed behavior
- Currently, default calendar permissions may allow organization members to view details. The goal is to programmatically update all mailboxes so the Default user access level is set to None.
Ensure you have Global Administrator or Exchange Administrator privileges, have the ExchangeOnlineManagement module installed, and test the PowerShell script on a small group of users before deploying it tenant-wide.
Use Exchange Online PowerShell to Update Permissions
Run an automated PowerShell script to retrieve all user mailboxes and set the Default calendar access rights to None.
This approach uses the Set-MailboxFolderPermission cmdlet to override the 'My organization' shared calendar permissions. It effectively prevents users from viewing calendar details unless they are granted explicit individual access.
Open PowerShell as an administrator and run the command `Connect-ExchangeOnline`. Sign in with your Microsoft 365 administrator credentials.
Run a script to loop through all user mailboxes. Execute: `foreach ($user in (Get-Mailbox -RecipientTypeDetails UserMailbox).PrimarySmtpAddress) { Set-MailboxFolderPermission -Identity "${user}:\Calendar" -User Default -AccessRights None -WarningAction SilentlyContinue -Confirm:$false }`.
Check a specific user's calendar permissions to ensure the change was applied by running `Get-MailboxFolderPermission -Identity "${user}:\Calendar"` and confirming that the Default user shows AccessRights as 'None'.

Looking for a cost-effective alternative to Microsoft Office?
While Microsoft 365 provides powerful administrative tools like Exchange Online PowerShell, it often requires expensive subscription plans. If you are looking to equip your organization with essential productivity software without the heavy costs, WPS Office is a lightweight, robust, and highly compatible alternative.
- 1. Download the Installer: Visit the official WPS website and download the free version for your operating system.
- 2. Install WPS Office: Run the setup file and follow the quick installation instructions to equip your device.
- 3. Open Your Office Files: Double-click any existing Word, Excel, or PowerPoint document to open it instantly in WPS Office.

Frequently Asked Questions
Can I apply this calendar setting directly through the Microsoft 365 admin portal?
While individual users can set the 'My organization' permission to 'None' via their Outlook calendar settings, applying this configuration tenant-wide to all users simultaneously requires using Exchange Online PowerShell.
What happens if a user's calendar folder is not named 'Calendar'?
If a user's mailbox language is localized (e.g., 'Calendrier' in French or 'Calendario' in Spanish), the script targeting the literal string '\Calendar' will fail for that user. You will need to query the default calendar folder name dynamically for localized environments.
Why does my PowerShell script throw an identity error?
This usually happens due to string formatting issues. Make sure your script uses `"${user}:\Calendar"` instead of `$user:\Calendar` so PowerShell correctly resolves the user variable before appending the folder path.




