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)".