365 AzureSync Permissions Fix- Export Errors

If you are using a local account rather than having MS created one from the wizard for better auditing and control. You may have to make some AD permissions changes via powershell. If you are seeing the following Export Errors:




Caution- you are modifying AD permissions to grant an account high level access. Do not use a regular user/admin account! Security best practices requires creating a separate service account that can be used exclusively for this process to allow proper auditing trail and security. 

I have found the following 3 commands give permissions needed to access the attributes:

$accountName = "Domain-Name\User-Name"

$ForestDN = "DC=Domain-Name,DC=Domain-Extension"
$cmd = "dsacls '$ForestDN' /I:S /G '`"$accountName`":WP;ms-ds-consistencyGuid;user'"
Invoke-Expression $cmd


accountName = "Domain-Name\User-Name"
$ForestDN = "DC=Domain-Name,DC=Domain-Extension"
$cmd = "dsacls '$ForestDN' /I:S /G '`"$accountName`":WP;msds-KeyCredentialLink;user'"
Invoke-Expression $cmd

accountName = "Domain-Name\User-Name"

$ForestDN = "DC=Domain-Name,DC=Domain-Extension"
$cmd = "dsacls '$ForestDN' /I:S /G '`"$accountName`":WP;msds-ExternalDirectoryObjectId;user'"
Invoke-Expression $cmd


You may need the following 3 settings to allow write back permissions from 365 to AD attributes:

Note: you may need to preinstall RSAT-AD Tools in Powershell:

Install-windowsfeature RSAT-AD-Tools

Set-ADSyncExchangeHybridPermissions -ADConnectorAccountDN ‘CN=Service-Account-name,CN=Service-Account-OU,DC=Domain-Name,DC=Domain-Extension

Set-ADSyncMsDsConsistencyGuidPermissions -ADConnectorAccountDN  ‘CN=Service-Account-name,CN=Service-Account-OU,DC=Domain-Name,DC=Domain-Extension

 Set-ADSyncPasswordWritebackPermissions –ADConnectorAccountDN ‘CN=Service-Account-name,CN=Service-Account-OU,DC=Domain-Name,DC=Domain-Extension

 

Credit:
https://www.petenetlive.com/kb/article/0001636
https://www.azure365pro.com/hardening-azure-ad-connect-service-account/



 



Comments

Popular posts from this blog

FRS to DFSR Post Cleanup “File Replication NtFrs Stopped”

Domain Migration SubinACL /Migratetodomain How To:

How to configure HP LaserJet Printer IPsec Encryption