Have also been stuck on this for quite some time...... found a solution. I deleted the original rule (precedence 106) and moved my cloned rule to precedence 106 and run a delta sync. Now my disabled users are showing in AAD as expected.
AAD Connect sync - Why accounts disabled in on-prem AD not disabled in Azure AD
Hi there,
I have a client who is using AAD Connect sync 2.1.20 to sync accounts from on-prem AD to Azure AD.
I have recently discovered that some of the disabled accounts in on-prem AD don't have their synced entities disabled in Azure AD, in other words these accounts are still enabled in Azure AD.
I ran the Azure AD Connect Single Object Sync PowerShell script to diagnose the problem. The report generated shows that AAD Connect finds the AD account has the UserAccountControl value of 0x202, which means "Normal account" (0x200) + "Disabled" (0x002). However, with the default transformation rule the imported object to the AAD Connector space have "accountEnabled" attribute ended up as "True", which subsequently resulted in the account in AAD not disabled.
The default transformation rule is:
IIF(BitAnd([userAccountControl],2)=0,True,False)
With the "userAccountControl" value being 0x202, this rule should result in "False", yet the resulted "userEnabled" value was "True".
Can someone let me know what happened here?
Regards.
Johnmen
Microsoft Security | Microsoft Entra | Microsoft Entra ID
3 answers
Sort by: Most helpful
-
-
Johnmen Zhang 5 Reputation points
2023-03-21T02:15:07.7966667+00:00 Hi Andy,
We cloned the default "In from AD - User Common" rule in order to add an attribute to determine if a user should be hidden from Exchange GAL. The transformations screenshot was taken from the cloned rule.
Here is the default rule we cloned from, it has been disabled:
Here is the rule we created from the clone:
Regards.
Johnmen
-
Samuel Mannhart 5 Reputation points
2023-07-18T06:27:53.8266667+00:00 Hi there,
Is there already a solution for this? We habe the exactly same problem.
Regards,
Samuel