Aspirapa.org Entra Cloud Sync / gMSA Troubleshooting Guide
CN=Managed Service Accounts container. The real issue was that the domain's otherWellKnownObjects attribute still pointed the Managed Service Accounts GUID to a deleted object under CN=Deleted Objects. Removing the stale \0ADEL reference and restoring the live mapping fixed the problem.1. Environment
- Domain: aspirapa.org
- Server used for repair: HQ-DC01
- Issue surface: Entra Provisioning Agent / Entra Cloud Sync setup
- Symptom: The wizard failed while trying to create or locate the Managed Service Account container
2. Original Symptoms
During the Entra Cloud Sync setup, the wizard reported that it could not find the Managed Service Accounts container. Earlier troubleshooting also uncovered several foundational Active Directory issues that had to be corrected before the final fix would succeed.
3. Earlier Problems That Were Addressed First
Before the final container mapping repair, the following issues were identified and worked through:
- Domain functional level was too old.
The domain was initially identified asWindows2008Domain. This was raised to Windows Server 2012 R2 domain functional level, which is necessary for modern gMSA and Entra-related workflows. - Old DC metadata needed cleanup.
Legacy domain controllers such asCYBERDC01andASPIRADC1were no longer present and required metadata cleanup, including NTDSUTIL cleanup, DNS cleanup, and review of Active Directory Sites and Services. - KDS root key and gMSA prerequisites were reviewed.
KDS keys were checked and a new KDS root key was added as part of the process. - DNS / secure channel discovery was broken.
nltest /sc_verifyfailed with1355 ERROR_NO_SUCH_DOMAIN. The NIC DNS configuration was corrected so the domain controller pointed to internal AD DNS only, and DNS / SRV discovery tests were rerun successfully. - Managed Service Accounts container checks were performed.
Eventually,CN=Managed Service Accounts,DC=aspirapa,DC=orgwas confirmed to exist, which proved that the final error was not simply “missing container.”
4. What Did Not Work
- Attempting to treat the issue as only a permissions problem
- Assuming the error meant the container did not exist
- Trying to add the mapping to
wellKnownObjectsinstead of the correct attribute - Trying to force the repair through LDP while the wrong target attribute was being used
5. How the Real Root Cause Was Found
PowerShell inspection of the domain root object showed that the built-in wellKnownObjects attribute did not contain the MSA mapping, but the otherWellKnownObjects attribute did. The problem was that the MSA GUID 1EB93889E40C45DF9F0C64D23BBB6237 pointed to a deleted object path instead of the live container.
Command used to inspect the live domain root mapping
Get-ADObject "DC=aspirapa,DC=org" -Properties otherWellKnownObjects |
Select-Object -ExpandProperty otherWellKnownObjects
Problematic output
B:32:683A24E2E8164BD3AF86AC3C2CF3F981:CN=Keys,DC=aspirapa,DC=org
B:32:1EB93889E40C45DF9F0C64D23BBB6237:CN=Managed Service Accounts\0ADEL:5b87c493-325b-45b2-9c8c-bd17424d981b,CN=Deleted Objects,DC=aspirapa,DC=org
That second line was the smoking gun. The MSA GUID existed, but it referenced a deleted object instead of:
CN=Managed Service Accounts,DC=aspirapa,DC=org
6. Final Repair That Worked
The successful repair was to remove the stale deleted-object mapping from otherWellKnownObjects and replace it with the correct live container mapping.
PowerShell repair commands
$dn = "DC=aspirapa,DC=org"
$bad = "B:32:1EB93889E40C45DF9F0C64D23BBB6237:CN=Managed Service Accounts\0ADEL:5b87c493-325b-45b2-9c8c-bd17424d981b,CN=Deleted Objects,DC=aspirapa,DC=org"
$good = "B:32:1EB93889E40C45DF9F0C64D23BBB6237:CN=Managed Service Accounts,DC=aspirapa,DC=org"
Set-ADObject -Identity $dn -Remove @{otherWellKnownObjects=$bad}
Set-ADObject -Identity $dn -Add @{otherWellKnownObjects=$good}
Get-ADObject $dn -Properties otherWellKnownObjects |
Select-Object -ExpandProperty otherWellKnownObjects
Expected good result
B:32:1EB93889E40C45DF9F0C64D23BBB6237:CN=Managed Service Accounts,DC=aspirapa,DC=org
Replication after repair
repadmin /syncall /AdeP
7. Verification Steps
- Confirm the stale
\0ADELreference is gone fromotherWellKnownObjects. - Confirm the live mapping exists for the MSA GUID.
- Run replication.
- Return to the Entra Provisioning Agent wizard and click Confirm again.
- Verify that the agent now proceeds without the Managed Service Accounts container error.
Useful verification commands
Get-ADObject "CN=Managed Service Accounts,DC=aspirapa,DC=org"
Get-ADObject "DC=aspirapa,DC=org" -Properties otherWellKnownObjects |
Select-Object -ExpandProperty otherWellKnownObjects
repadmin /syncall /AdeP
8. Full Recommended Troubleshooting Flow for Similar Cases
- Check domain functional level and raise to at least 2012 / 2012 R2 if required.
- Clean stale DC metadata for removed domain controllers.
- Check DNS client settings on domain controllers and ensure they point only to internal AD DNS servers.
- Validate domain discovery with
nltest,dcdiag, and DNS SRV lookups. - Confirm KDS root key and other gMSA prerequisites.
- Confirm the live MSA container exists.
- Inspect both
wellKnownObjectsandotherWellKnownObjects. - If the MSA GUID points to a deleted object, repair the mapping.
- Sync replication and rerun the Entra provisioning workflow.
9. Why This Matters
This issue can mislead administrators because the Managed Service Accounts container may exist and still not be resolvable by Entra or gMSA-related tools. The issue is not always the container itself. It can be the directory reference to that container.
otherWellKnownObjects mapping, the Entra Cloud Sync / Provisioning Agent error was resolved successfully.10. Copy/Paste Quick Reference
# Inspect the current mapping
Get-ADObject "DC=aspirapa,DC=org" -Properties otherWellKnownObjects |
Select-Object -ExpandProperty otherWellKnownObjects
# Repair the stale deleted-object reference
$dn = "DC=aspirapa,DC=org"
$bad = "B:32:1EB93889E40C45DF9F0C64D23BBB6237:CN=Managed Service Accounts\0ADEL:5b87c493-325b-45b2-9c8c-bd17424d981b,CN=Deleted Objects,DC=aspirapa,DC=org"
$good = "B:32:1EB93889E40C45DF9F0C64D23BBB6237:CN=Managed Service Accounts,DC=aspirapa,DC=org"
Set-ADObject -Identity $dn -Remove @{otherWellKnownObjects=$bad}
Set-ADObject -Identity $dn -Add @{otherWellKnownObjects=$good}
# Verify the fix
Get-ADObject $dn -Properties otherWellKnownObjects |
Select-Object -ExpandProperty otherWellKnownObjects
# Replicate
repadmin /syncall /AdeP