logo
search
Calendar Problems

How to Set All Microsoft 365 User Calendars to Hide Details via PowerShell

John WilsonJohn Wilson Sep 28, 2026 869 views

Question details

The administrator needs to apply a tenant-wide setting to hide calendar event details for all users across the organization.

How to Set All Microsoft 365 User Calendars to Hide Details
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.
Before you start

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.

Solution 1Recommended

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.

1
Connect to Exchange Online

Open PowerShell as an administrator and run the command `Connect-ExchangeOnline`. Sign in with your Microsoft 365 administrator credentials.

2
Retrieve and Update Mailboxes

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 }`.

3
Verify the Changes

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'.

Use Exchange Online PowerShell to Update Permissions
PowerShell Syntax Note: Ensure you use the exact formatting `"${user}:\Calendar"` in your script. Missing the curly braces around the user variable is a common cause of identity parsing errors.
Free Microsoft Office alternative

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. 1. Download the Installer: Visit the official WPS website and download the free version for your operating system.
  2. 2. Install WPS Office: Run the setup file and follow the quick installation instructions to equip your device.
  3. 3. Open Your Office Files: Double-click any existing Word, Excel, or PowerPoint document to open it instantly in WPS Office.
Fully compatible with Microsoft Office formats (.docx, .xlsx, .pptx) for seamless collaborationLightweight installation that ensures smooth performance on all devicesFamiliar user interface requiring zero learning curve for seamless migrationFree to use for daily essential word processing, spreadsheets, and presentations
QA img-9

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.