Enable-OrganizationCustomization Error

Owolabi 26 Reputation points
2021-11-21T14:23:14.193+00:00

I got this error when I ran the Enable-OrganizationCustomization for the first time on my tenant. How can I resolve this?

Enable-OrganizationCustomization: The following error was generated when "

handle install, upgrade and transition to different service plan, including transition from/to tiny-tenant

      #1. tiny           tenant   install/upgrade       -> skip - never do anything                                                                                                                                        
      #2. regular/shared tenant - install               -> Install-CannedRbacRoleAssignmentsRAP -InvocationMode $RoleInstallationMode                                                                                      
      #3. regular/shared tenant - upgrade               -> Install-CannedRbacRoleAssignmentsRAP -InvocationMode $RoleInstallationMode                                                                            
      #4. regular        tenant - transition to regular -> Install-CannedRbacRoleAssignmentsRAP -InvocationMode "ServicePlanUpdate"
      #5. regular        tenant - transition to tiny    -> skip - dehydration not supported
      #6. tiny           tenant - transition to regular -> Install-CannedRbacRoleAssignmentsRAP -InvocationMode $RoleInstallationMode
      $isServicePlanUpdate = ($OldServicePlanSettings -ne $null);
      if($AdvancedHydrateableObjectsSharedEnabled)
      {
          # cases 1 or 5
      }
      else
      {
        if($isServicePlanUpdate)
        {
            if($OldServicePlanSettings.Organization.ShareableConfigurationEnabled)
            {
              # case 6, Transition from tiny tenant to the regular one, creating all role assignments unconditionally ($RoleInstallationMode=Install)
              $TenantRoleInstallationMode = $RoleInstallationMode;
            }
            else
            {
              # case 4, Service plan transition for regular tenant, creating all role assignments conditionally
              $TenantRoleInstallationMode = "ServicePlanUpdate";
            }
            Install-CannedRbacRoleAssignmentsRAP `
              -InvocationMode $TenantRoleInstallationMode `
              -ServicePlanSettings $NewServicePlanSettings `
              -PreviousServicePlanSettings $OldServicePlanSettings `
              -DomainController $RoleDomainController `
              -Organization $RoleOrganizationHierarchicalPath;
        }
        else
        {
            # case 2 "Install" or case 3 "Upgrade"
            Install-CannedRbacRoleAssignmentsRAP `
              -InvocationMode $RoleInstallationMode `
              -ServicePlanSettings $ServicePlanSettings `
              -DomainController $RoleDomainController `
              -Organization $RoleOrganizationHierarchicalPath;
        }
      }
    " was run: "System.Management.Automation.ActionPreferenceStopException: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Active Directory operation failed on DB6P194A001DC01.EURP194A001.PROD.OUTLOOK.COM. The object 'CN=MyTeamMailboxes-Default Role Assignment Policy-99,CN=Role Assignments,CN=RBAC,CN=Configuration,CN=ecaglobal.onmicrosoft.com,CN=ConfigurationUnits,DC=EURP194A001,DC=PROD,DC=OUTLOOK,DC=COM' already exists.

at System.Management.Automation.Runspaces.AsyncResult.EndInvoke()
at System.Management.Automation.PowerShell.EndInvoke(IAsyncResult asyncResult)
at Microsoft.Exchange.Configuration.MonadDataProvider.MonadPipelineProxy.ClosePipeline(MonadAsyncResult asyncResult)".

Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,503 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,462 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Rich Matheisen 45,906 Reputation points
    2021-11-21T19:38:39.997+00:00

    I don't see the Enable-OrganizationCustomization cmdlet in the code you posted, but the reason the code died is because the variable "$ErrorActionPreference" is set to "STOP" (just as the text on line #43 says) and a non-terminating error was thrown.

    Change that to "Continue" and non-terminating errors won't be turned into terminating errors.


  2. Limitless Technology 39,511 Reputation points
    2021-11-25T16:12:10.167+00:00

    Hi there,

    To replace the built-in default role assignment policy with your own default role assignment policy, you can use the Set-RoleAssignmentPolicy cmdlet to select a new default. When you do this, any new mailboxes are assigned the role assignment policy you specified by default if you don't explicitly specify a role assignment policy.

    Here is a link as well to help you out https://answers.microsoft.com/en-us/msoffice/forum/all/enable-organizationcustomization-cmdlet-failed/48b7946e-6d32-4d7d-b699-e993ac60f382


    --If the reply is helpful, please Upvote and Accept it as an answer--

    0 comments No comments