Hybrid identity, B2B guests and External ID
Compare Connect Sync and Cloud Sync and hybrid sign-in options, and choose B2B or External ID for outside users.
By Invicly Tech, , in Microsoft Entra & Microsoft 365 Administration. About 12 minutes to read.
In short
Many companies still run on-premises Active Directory, so hybrid identity copies those users into Entra ID with Microsoft Entra Connect Sync or Microsoft Entra Cloud Sync and lets them sign in with the same password. People outside the company are handled differently: partners and contractors join your workforce tenant as B2B guests, while customers of your own apps belong in an External ID external tenant. Picking the right model up front avoids messy migrations later.
Think of it like this: Sync is a translator copying your staff list from the old office into the new one every half hour; B2B guests are visitors with day passes; External ID is a separate shop door for the public.
Explained simply
Many companies have run Windows Server Active Directory, or AD DS, for years. Their staff accounts live there. When they adopt Microsoft 365, they do not want to create every account again. Hybrid identity copies the accounts from AD DS into Microsoft Entra ID and keeps them in step.
Two tools do the copying. Microsoft Entra Connect Sync is a full program installed on a Windows server. Microsoft Entra Cloud Sync uses a small agent on-premises and is configured from the cloud. Both copy users and groups; they differ in features and in how much you run yourself.
Users also need to sign in. With password hash sync the cloud checks a protected copy of the password. With pass-through authentication the cloud asks an on-premises agent to check it. With federation, often AD FS, the company's own servers handle sign-in completely.
Not everyone is staff. A partner who edits a shared document can be invited as a B2B guest. They use their own work account or email, and you control what they can reach. Customers signing up to your own app are different again: they belong in Microsoft Entra External ID, in a separate external tenant.
Hybrid labs need a Windows Server domain controller, which you can run as a virtual machine. If you do not have one, use the tabletop exercise in this article, which rehearses a sync conflict and a cutover on paper.
Press Play on a diagram to walk through it one step at a time.
- Full sync engine on a Windows server
- Rich custom rules and filtering
- Supports advanced writeback scenarios
- One active server, staging server for failover
- Light provisioning agent on-premises
- Configured from the cloud
- Several agents for high availability
- Good for disconnected forests and mergers
- Employees
- Cloud-only users
- Synced from AD DS
- Partners and contractors
- B2B collaboration guests
- Cross-tenant access settings
- Access packages that expire
- Customers of your app
- External ID external tenant
- Self-service sign-up
- Social or email sign-in
- AD DS to Sync engine: New user ana@contoso.example, ImmutableId A1New user ana@contoso.example, ImmutableId A
- Sync engine to Entra ID: Export user with UPN ana@contoso.example2Export user with UPN ana@contoso.example
- Entra ID to Sync engine: Conflict: cloud-only user already has this UPN3Conflict: cloud-only user already has this UPN
- Sync engine to Admin: Sync error reported in Connect Health4Sync error reported in Connect Health
- Admin to Entra ID: Confirm cloud user is the same person, check data5Confirm cloud user is the same person, check data
- Admin to Sync engine: Allow soft match or rename the duplicate, rerun sync6Allow soft match or rename the duplicate, rerun sync
In depth
How sync matches and who owns which attribute
Sync links each AD object to an Entra object through a source anchor, by default the ms-DS-ConsistencyGuid attribute based on the object GUID. When an AD user is first synced and a cloud user already exists with the same UPN or primary SMTP address, sync can soft match them and take over the cloud user. Once linked, AD DS is the source of authority: most attributes must be changed on-premises.
Connect Sync runs a delta cycle every 30 minutes by default; you can force one on the server with Start-ADSyncSyncCycle -PolicyType Delta. Cloud Sync runs on its own schedule and offers on-demand provisioning for one user, which is handy for testing. Filtering by OU or group decides which objects are copied at all. Keep service accounts and admin accounts out of sync where you can.
- Source anchor links AD and Entra objects
- Soft match on UPN or proxy address
- Synced attributes are edited on-premises
- Filter by OU to keep scope small
Choosing a hybrid sign-in method
Password hash sync is the recommended default. It is simple, it keeps working if on-premises servers fail, and it lets ID Protection detect leaked credentials. Pass-through authentication suits organisations that must validate passwords on-premises; it needs at least two or three agents for resilience, and sign-in stops if all agents are unreachable. Federation with AD FS gives full on-premises control but adds servers, certificates and a public endpoint to run.
Seamless single sign-on can sit on top of PHS or PTA for domain-joined PCs on the company network. Many companies move from federation to cloud authentication using staged rollout, which lets you move pilot groups first and check sign-ins before converting the domain. You can also enable PHS alongside federation as a backup.
- Cloud checks the password
- Works if on-premises is down
- Enables leaked-credential detection
- Fewest servers
- Agents check against AD DS
- On-premises password rules apply live
- Needs several agents
- Sign-in fails if agents are down
- AD FS handles sign-in
- Full on-premises control
- Servers, certificates, public endpoint
- Most to run and patch
B2B guests and cross-tenant access
B2B collaboration adds an outside person to your workforce tenant as a user with user type Guest. They redeem an invitation and sign in with their home Entra account, a Microsoft account, a one-time email passcode or a configured social or SAML provider. You govern guests with external collaboration settings (who can invite, which domains are allowed), cross-tenant access settings (which organisations, and whether to trust their MFA and device claims), Conditional Access and access reviews.
B2B direct connect is a separate trust used for Teams shared channels; those users do not appear as guests in your directory. Note that guests may need licences for some features, and Entra ID Governance features for guests are billed on monthly active users.
- Restrict invitations to named domains if possible
- Trust partner MFA only for known partners
- Review guests quarterly
- Remove guests when projects end
External ID for customers
When you build an app for the public, such as an online shop or a booking portal, customer accounts should not live in your staff tenant. Microsoft Entra External ID lets you create an external tenant for them, with self-service sign-up user flows, email and password or one-time passcode sign-in, social providers such as Google or Facebook, and company branding. Your app registers in that tenant and uses standard OpenID Connect.
Azure AD B2C, the older product, is no longer available for new customers, though existing tenants are supported. New projects should use External ID. Pricing is based on monthly active users with a free allowance; check the current pricing page before you commit, and test in a free external tenant first.
Learn it in 5 short steps
About 35m each. Track them with a timer in your plan.
- 1Compare Connect Sync and Cloud Sync~35m
- 2Pick a hybrid sign-in method~35m
- 3Invite B2B guests~35m
- 4Use External ID for customers~35m
- 5Rehearse a sync conflict~35m
Key points
- Hybrid sign-in options are password hash sync (PHS), pass-through authentication (PTA) and federation; PHS is simplest and also helps leaked-credential detection.
- Connect Sync is the full engine with more features; Cloud Sync is lighter and easier to make highly available. Check the current feature comparison before choosing.
- For synced users, AD DS is the source of truth: edit them on-premises, not in Entra.
- B2B guests live in your workforce tenant and sign in with their own organisation or email account.
- External ID external tenants are for customer-facing apps; Azure AD B2C is no longer sold to new customers.
Key terms
Tap a card to flip it. 0/6 known
Examples
Tabletop: duplicate UPN conflict
Tenant-free. Scenario: HR created ana@contoso.example in AD DS, but the help desk had already made a cloud-only Ana with the same UPN and a mailbox. Step 1: find the error in the sync errors view or with the query below. Step 2: decide whether the two are the same person. If yes, let sync soft match so the AD account takes over the cloud account, keeping the mailbox. If not, rename one UPN. Step 3: rerun a delta sync. Evidence: the user now shows On-premises sync enabled = Yes and no provisioning error. Rollback: if the wrong objects matched, stop sync scope for that OU and open a support case before deleting anything.
Connect-MgGraph -Scopes "User.Read.All"
Get-MgUser -All -Property displayName,userPrincipalName,onPremisesSyncEnabled,onPremisesProvisioningErrors |
Where-Object { $_.OnPremisesProvisioningErrors.Count -gt 0 } |
Select-Object DisplayName, UserPrincipalName, OnPremisesSyncEnabled
# On the Connect Sync server, after fixing the data:
# Start-ADSyncSyncCycle -PolicyType DeltaTabletop: move from AD FS to cloud authentication
Design-only. Contoso uses AD FS and wants fewer servers. Step 1: enable password hash sync while still federated, so hashes are already in Entra. Step 2: use staged rollout to move a pilot group of 20 users to PHS. Step 3: check sign-in logs for the pilot: authentication method and success. Step 4: expand group by group. Step 5: convert the domain from federated to managed during a quiet window. Evidence: sign-ins show cloud authentication and AD FS sees no traffic. Rollback: remove users from staged rollout, or convert the domain back to federated, before AD FS is retired.
Quick reference
- Connect Sync: full engine on Windows Server; Cloud Sync: light agent, configured in the cloud.
- Force a Connect Sync delta cycle: Start-ADSyncSyncCycle -PolicyType Delta.
- Synced users: change attributes in AD DS, not in Entra.
- PHS is the recommended default and enables leaked-credential detection.
- Use staged rollout to pilot cloud authentication before converting a federated domain.
- Partners = B2B guests in your tenant; customers = External ID external tenant.
- Azure AD B2C is closed to new customers; start new customer apps on External ID.
Common mistakes
- Editing a synced user's name in Entra and watching the next sync cycle overwrite it.
- Creating a cloud user and an AD user with the same UPN, causing a duplicate attribute conflict.
- Putting customer accounts in the workforce tenant as guests, mixing them with staff policies and licences.
Quick quiz
Pick an answer to see if you're right and why.
Practice exercises
Try each one yourself first. Use the hint if you get stuck, then compare with the solution.
- Exercise 1easy
Classify each person: new employee in an AD-based company; designer from a partner agency; customer of the company's app.
- Exercise 2medium
List the checks you would make before choosing Cloud Sync over Connect Sync for a company with two forests after a merger.
- Exercise 3hard
Write a cutover runbook outline from Connect Sync to Cloud Sync for one OU, including verification and rollback.
Check yourself
Answer in your head, reveal, then be honest with yourself.
Feel confident about this topic?
Frequently asked questions
- Can Connect Sync and Cloud Sync run at the same time?
- Yes, in the same tenant, as long as each object is synced by only one of them. Scope them to different OUs or forests.
- Do guests need a licence?
- Many basic collaboration features work without one, but some features are licensed per monthly active user. Check current External ID and Entra licensing pages for your case.
- Is AD FS required for single sign-on?
- No. Password hash sync or pass-through authentication with seamless SSO, or Entra-joined devices, give single sign-on without AD FS.
- What happened to Azure AD B2C?
- It is no longer sold to new customers. Existing B2C tenants keep working, and new customer projects should use Microsoft Entra External ID.