DEV Community

Ranjit Rimal
Ranjit Rimal

Posted on

On-Premises Active Directory Synchronization for Single Sign-On

Microsoft 365 Business Premium integrates cloud productivity workloads (Exchange Online, SharePoint Online, Microsoft Teams, Intune, etc.) with enterprise-grade identity management via Azure Active Directory Premium P1. One of the most powerful capabilities within this subscription tier is the ability to extend an on-premises Active Directory (AD) forest into Azure AD, thereby enabling hybrid identity and Single Sign-On (SSO).

This is accomplished through Azure AD Connect, a synchronization and identity management bridge. When properly deployed, it ensures the following outcomes:

  • A singular authoritative identity source across on-prem and cloud.
  • Kerberos-backed seamless authentication for domain-joined devices.
  • Self-Service Password Reset (SSPR) with writeback to AD DS (supported due to P1 license).
  • Conditional Access, MFA, and Intune policy enforcement at the cloud layer while leveraging on-prem AD identities.

Thus, Microsoft 365 Business Premium goes far beyond SMB-focused offerings — it delivers a secure, policy-driven identity plane equal to enterprise deployments, yet without the overhead of full AD FS federation unless strictly mandated.

Feature Set

Directory Synchronization via Azure AD Connect

  • Synchronizes user objects, groups, and directory attributes to Azure AD.
  • Includes filtering (attribute-based, domain-based, OU-based).
  • Supports hybrid Exchange coexistence.

Seamless Single Sign-On (SSO)

  • Domain-joined devices automatically authenticate against Azure AD without re-prompting for credentials.
  • Achieved by Kerberos decryption using the AZUREADSSOACC computer account within AD.

Password Hash Synchronization (PHS)

  • Securely synchronizes password hashes (after salting and hashing with SHA256) from AD to Azure AD.
  • Provides redundancy and sign-in continuity if on-prem AD is unreachable.

Pass-through Authentication (PTA)

  • Forwards authentication requests from Azure AD to on-prem Domain Controllers in real-time.
  • Avoids storing hashes in the cloud while enabling SSO.

Password Writeback (Enabled with Business Premium)

  • Changes performed in the Microsoft 365 self-service password reset portal write back to AD DS.
  • Ensures on-prem and cloud password parity.

Group Writeback

  • Cloud-created Microsoft 365 Groups can be written back to AD DS as universal distribution groups.

Conditional Access + Intune

  • Synchronized identities can be controlled via Conditional Access Policies, MFA enforcement, and mobile device compliance policies.

Future Federation Extensibility

  • Supports upgrade path to Active Directory Federation Services (AD FS) if required by strict regulatory controls (e.g., smart card login, certificate-based authentication).

Prerequisites
Infrastructure

  • Active Directory Domain Services (AD DS) running Windows Server 2012 R2 or later.
  • Functional UPN suffix aligned with a verified custom domain in Microsoft 365 (e.g., contoso.com).
  • Minimum 1x dedicated server (physical or VM) for Azure AD Connect.

Server Requirements for Azure AD Connect Host

  • OS: Windows Server 2016 / 2019 / 2022.
  • CPU: Quad-core 1.6 GHz or higher.
  • RAM: Minimum 4 GB (8 GB recommended).
  • Disk: 70 GB free space.
  • Network: Outbound HTTPS (TCP 443) to Microsoft cloud endpoints.

Licensing & Permissions

  • Microsoft 365 Business Premium licenses (includes Azure AD Premium P1).
  • Global Administrator credentials in Microsoft 365.
  • Enterprise Administrator credentials in AD DS.

Deployment Procedure
Step 1: Validate AD DS Health
repadmin /replsummary
dcdiag /v

  • Ensure replication is error-free.
  • Clean up duplicate UPNs and ensure UPNs match verified Microsoft 365 domains.

Step 2: Prepare UPN Suffix

If existing AD accounts use user@localdomain.local, update them:

Get-ADUser -Filter * -Properties UserPrincipalName |
ForEach-Object {
$newUpn = $.SamAccountName + "@contoso.com"
Set-ADUser $
-UserPrincipalName $newUpn
}

Step 3: Install Azure AD Connect

  • Download from Microsoft Download Center.
  • Run setup with Enterprise Admin credentials.
  • Choose Custom Installation.

Step 4: Configure Authentication Method

Options:

  • Password Hash Synchronization + Seamless SSO (default, resilient).
  • Pass-through Authentication + Seamless SSO (for real-time validation).
  • Check Enable Seamless Single Sign-On during setup.

Step 5: Enable Seamless SSO (via PowerShell if needed)

  • Import-Module AzureADSSO
  • Enable-AzureADSSOForest

This creates the AZUREADSSOACC computer account in AD DS.

Step 6: Configure Password Writeback (Business Premium)
Import-Module MSOnline
Connect-MsolService
Set-MsolDirSyncFeature -Feature PasswordWriteback -Enable $true

Step 7: Trigger Initial Synchronization
Import-Module ADSync
Start-ADSyncSyncCycle -PolicyType Initial

Step 8: Verify Synchronization
Get-MsolUser -Synchronized -All | ft DisplayName, UserPrincipalName

Step 9: Test SSO
Log on to a domain-joined PC.
Access portal.office.com
Ensure transparent login with no secondary credential prompt.

Advanced PowerShell Commands
Force Delta Sync
Start-ADSyncSyncCycle -PolicyType Delta

Check Azure AD Connect Status
Get-ADSyncScheduler
Get-ADSyncConnectorRunStatus

List All Synced Users
Get-MsolUser -Synchronized -All | Select DisplayName, UserPrincipalName

Enable Group Writeback
Set-MsolDirSyncFeature -Feature GroupWriteback -Enable $true

Reset Azure AD Connect Configuration
Stop-ADSyncSyncCycle
Set-ADSyncScheduler -SyncCycleEnabled $false

Conclusion

With Microsoft 365 Business Premium, organizations unlock the full potential of hybrid identity. The inclusion of Azure AD Premium P1 enables advanced features such as Password Writeback, Conditional Access, Intune integration, and MFA enforcement — far beyond what Business Basic provides.

Through Azure AD Connect, seamless synchronization between on-prem AD DS and Azure AD creates a unified identity plane, ensuring Single Sign-On (SSO) across corporate devices and Microsoft 365 workloads. This configuration not only simplifies user experience but enforces strong security postures, operational resilience, and regulatory compliance.

In practice, this deployment architecture provides SMBs and mid-size enterprises with enterprise-class identity governance, future-proof scalability, and the capability to transition toward Zero Trust frameworks without abandoning legacy on-premises directories.

Top comments (0)