Skip to content

Commit 191cdae

Browse files
authored
Update cannot-manage-objects.md
1 parent c68b901 commit 191cdae

File tree

1 file changed

+19
-16
lines changed

1 file changed

+19
-16
lines changed

support/entra/entra-id/user-prov-sync/cannot-manage-objects.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Resolves an issue that you can't manage or remove objects created t
44
ms.date: 08/30/2021
55
ms.reviewer:
66
ms.service: entra-id
7-
ms.custom: sap:Microsoft Entra Connect Sync, has-azure-ad-ps-ref
7+
ms.custom: sap:Microsoft Entra Connect Sync, no-azure-ad-ps-ref
88
---
99
# Can't manage or remove objects that were synchronized through the Azure Active Directory Sync tool
1010

@@ -34,33 +34,36 @@ This issue may occur if one or more of the following conditions are true:
3434

3535
You want to manage objects in Office 365, Azure, or Intune and you no longer want to use directory synchronization.
3636

37-
[!INCLUDE [Azure AD PowerShell deprecation note](~/../support/reusable-content/msgraph-powershell/includes/aad-powershell-deprecation-note.md)]
38-
39-
1. If you're not running Windows 10, install the 64-bit version of the Microsoft Online Services Sign-in Assistant: [Microsoft Online Services Sign-in Assistant for IT Professionals RTW](https://download.microsoft.com/download/7/1/E/71EF1D05-A42C-4A1F-8162-96494B5E615C/msoidcli_32bit.msi).
40-
1. Install the Microsoft Azure Active Directory module for Windows PowerShell:
41-
42-
1. Open an elevated Windows PowerShell command prompt (run Windows PowerShell as an administrator).
43-
2. Run the `Install-Module MSOnline` command.
44-
45-
1. Disable directory synchronization by running the following command:
37+
1. Make sure that [Microsoft Graph PowerShell is installed](/powershell/microsoftgraph/installation).
38+
2. Use the `Connect-MgGraph` command to sign in with the required scopes such as `Organization.ReadWrite.All`. For more information, see [Get started with the Microsoft Graph PowerShell SDK](/powershell/microsoftgraph/get-started).
39+
1. Disable directory synchronization by running the [update-mgorganization](/powershell/module/microsoft.graph.identity.directorymanagement/update-mgorganization) command.
4640

4741
```powershell
48-
Set-MsolDirSyncEnabled -EnableDirSync $false
42+
43+
$organizationId = (Get-MgOrganization).Id
44+
45+
# Store the False value for the DirSyncEnabled Attribute
46+
$params = @{
47+
onPremisesSyncEnabled = $False
48+
}
49+
50+
# Perform the update
51+
Update-MgOrganization -OrganizationId $organizationId -BodyParameter $params
4952
```
5053
51-
1. Check that directory synchronization was fully disabled by using the Windows PowerShell. To do it, run the following command periodically:
54+
1. Check that directory synchronization was fully disabled. To do it, run the following command:
5255
5356
```powershell
54-
(Get-MSOLCompanyInformation).DirectorySynchronizationEnabled
57+
Get-MgOrganization | Select OnPremisesSyncEnabled
5558
```
5659
57-
This command will return **True** or **False**. Continue to run this command periodically until it returns **False**, and then go to the next step.
60+
This command will return **True** or ***False**. Continue to run this command periodically until it returns **False**, and then go to the next step.
5861
5962
It may take 72 hours for deactivation to be completed. The time depends on the number of objects that are in your cloud service subscription account.
6063
6164
1. Try to update an object by using Windows PowerShell or by using the cloud service portal.
6265
63-
Step 4 may take a while to be completed. There's a process in the cloud service environment that computes attribute values. The process must be completed before the objects can be changed by using Windows PowerShell or by using the cloud service portal.
66+
Step 4 may take a while to be completed. There's a process in the cloud service environment that computes attribute values. The process must be completed before the objects can be changed by using Windows PowerShell or by using the cloud service portal.
6467
6568
### You delete an object from an on-premises AD DS. However, the object isn't deleted from your cloud service subscription account
6669
@@ -70,7 +73,7 @@ Force directory synchronization by using the steps on this article: [Start the S
7073
- If all updates and deletions aren't synchronized to the cloud service, contact Support.
7174
7275
> [!NOTE]
73-
> As an alternative resolution for this scenario, an object can be manually deleted in the cloud service. However, the object can't be updated in the cloud service. For more information about how to resolve this issue, see the following Microsoft Knowledge Base article: [Object deletions aren't synchronized to Microsoft Entra ID when using the Azure Active Directory Sync tool](https://support.microsoft.com/help/2709902).  
76+
> As an alternative resolution for this scenario, an object can be manually deleted in the cloud service. However, the object can't be updated in the cloud service. For more information about how to resolve this issue, see the following Microsoft Knowledge Base article: [Object deletions aren't synchronized to Microsoft Entra ID when using the Azure Active Directory Sync tool](https://support.microsoft.com/help/2709902).
7477
7578
## More information
7679

0 commit comments

Comments
 (0)