Prepared Active Directory
Reviewed user accounts and user principal names before synchronisation and tested a routable UPN using the public domain.
Infrastructure / Cloud
Connecting an on-premises Windows Server Active Directory environment to Microsoft 365 using Entra Connect, while learning how hybrid identity, UPNs and directory synchronisation work in practice.
Project Overview
The goal of this project is to extend my on-premises Active Directory lab into Microsoft 365 and Entra ID, allowing me to explore hybrid identity administration in a realistic environment rather than working with cloud-only demo accounts.
Environment
The project uses a Windows Server 2025 domain controller in my segmented homelab, a Microsoft 365 E5 trial tenant, Entra ID and Microsoft Entra Connect. The lab is routed through OPNsense and uses the soundmagus.local Active Directory domain alongside a verified public sign-in domain.
What I Did
Reviewed user accounts and user principal names before synchronisation and tested a routable UPN using the public domain.
Installed and configured Microsoft Entra Connect to connect the on-premises directory to the Microsoft 365 tenant.
Used PowerShell and Entra Connect tooling to inspect the ADSync service, scheduler behaviour, run profiles and directory objects.
Worked through connector and management-agent problems methodically rather than simply rebuilding the environment.
Troubleshooting
The internal Active Directory namespace is not publicly routable, so hybrid identity required careful handling of user principal names.
The Entra Connect sync engine reported management-agent related errors, which required checking the ADSync service, configuration and run history.
Learning
Developed a practical understanding of how on-premises identities are represented and synchronised into Entra ID.
Improved confidence using PowerShell to inspect Active Directory and Entra Connect state.
Reinforced the value of validating each dependency before changing configuration.
Evidence & Troubleshooting
I checked the current user principal names before synchronisation so I could identify which identities were still using the internal soundmagus.local suffix.
Get-ADUser -Filter * | Select-Object SamAccountName,UserPrincipalName,Enabled fmercury fmercury@markngray.co.uk True mjackson mjackson@soundmagus.local True dross dross@soundmagus.local True
When the sync tooling reported errors, I first confirmed that the sync service itself was running before making configuration changes.
Get-Service ADSync Status Name DisplayName ------ ---- ----------- Running ADSync Microsoft Azure AD Sync
Entra Connect commands reported that a specified management agent could not be found.
Checked ADSync service state, scheduler output, run profiles, Active Directory users and UPN configuration.
Stopped the ADSync service safely and continued validating the connector configuration rather than repeatedly rerunning failing sync commands.
Next Steps
Complete the current Entra Connect troubleshooting, confirm stable directory synchronisation, then expand the lab into Intune device management, Conditional Access and broader Microsoft 365 administration.