How to resolve error "The command your tried to run isn't currently allowed in your organization. To run this command you first need to run the command Enable-OrganizationCustomization"

Table of Contents

Case #

When you try to run Exchange Online organization-wide configuration cmdlets you may come across the following error:

"The command your tried to run isn't currently allowed in your organization. To run this command you first need to run the command Enable-OrganizationCustomization". You may be prompted to run the Enable-OrganizationCustomization cmdlet before you create or modify objects in your Exchange Online organization.

The reason the above error occurred is because the tenant is currently in a compressed state.  This is called dehydrated or tiny tenant mode.  Think about the multitude of customers in Office 365 that have a basic tenant and do not need to make any customisations or configure a hybrid deployment.  Those customers can run quite happily in the default dehydrated mode and parts of their configuration are compressed to save on space and resources.  The dehydrated state is the default for a tenant. By running the below Powershell cmdlet you can see the dehydration status of the tenant:

Get-OrganizationConfig | fl Identity, IsDehydrated

Solution #

To enable OrganizationCustomization you must connect to Exchange Online using Remote PowerShell and run the Enable-OrganizationCustomization cmdlet for the affected Microsoft 365 tenant. Then run again the Get-OrganizationConfig | fl Identity, IsDehydrated cmdlet again, to verify that the "IsDehydrated" flag is set to false.

Sources #

https://docs.microsoft.com/en-us/powershell/module/exchange/enable-organizationcustomization?view=exchange-ps

Powered by BetterDocs