Skip to content

Commit 238d7ba

Browse files
authored
Update cannot-manage-objects.md
1 parent 05d9171 commit 238d7ba

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,18 @@ This issue may occur if one or more of the following conditions are true:
3535
You want to manage objects in Office 365, Azure, or Intune and you no longer want to use directory synchronization.
3636

3737
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).
38+
1. 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).
3939
1. Disable directory synchronization by running the [update-mgorganization](/powershell/module/microsoft.graph.identity.directorymanagement/update-mgorganization) command.
4040

4141
```powershell
42-
4342
$organizationId = (Get-MgOrganization).Id
4443
45-
# Store the False value for the DirSyncEnabled Attribute
4644
$params = @{
4745
onPremisesSyncEnabled = $False
4846
}
4947
50-
# Perform the update
5148
Update-MgOrganization -OrganizationId $organizationId -BodyParameter $params
5249
```
53-
5450
1. Check that directory synchronization was fully disabled. To do it, run the following command:
5551
5652
```powershell
@@ -80,7 +76,13 @@ Force directory synchronization by using the steps on this article: [Start the S
8076
To re-enable directory synchronization, run the following command:
8177
8278
```powershell
83-
Set-MsolDirSyncEnabled -EnableDirSync $true
79+
$organizationId = (Get-MgOrganization).Id
80+
81+
$params = @{
82+
onPremisesSyncEnabled = $True
83+
}
84+
85+
Update-MgOrganization -OrganizationId $organizationId -BodyParameter $params
8486
```
8587

8688
It's important to plan carefully when you re-enable directory synchronization. If you used the cloud service portal or Windows PowerShell to make any changes directly to the objects that were originally synchronized from on-premises AD DS, the changes will be overwritten by on-premises attributes and settings the first time that synchronization occurs after directory synchronization is re-enabled.

0 commit comments

Comments
 (0)