Join our Newsletter — 33% off our NHI Course
Home› Guides› Directory Service vs Identity Provider: Which Controls Live…
Guide Identity & Access Management (IAM)

Directory Service vs Identity Provider: Which Controls Live Where and Why

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 14 November 2026 18 min read
On this page

A directory service stores accounts and their attributes, while an identity provider authenticates someone and issues a signed token that other systems trust, and most identity incidents happen where teams confuse the two. The directory (Active Directory Domain Services, an LDAP server, a cloud directory) is the store of record: who exists, which groups they belong to, which credentials they hold. The identity provider (IdP) is the token issuer: it checks a credential once and hands relying parties a SAML assertion or an OpenID Connect ID Token. This guide explains the split at architecture level, which security controls belong on which side, how each side is attacked, where service accounts and other non-human identities should live, and how to decide between cloud-only and hybrid designs. It is written for identity architects, security engineers and auditors who need to place controls correctly rather than buy a product. For product selection, see the Directory Services and Cloud Directory Buyer's Guide and the IAM and IdP Buyer's Guide.

Key takeaways

  • Two jobs, two trust anchors. The directory's crown jewels are its password hashes and replication rights; the IdP's crown jewels are its token-signing keys and federation trusts. Protect both as tier 0.
  • LDAP is not an identity provider. An LDAP bind proves a password to one server for one session; it issues no portable, signed assertion. An IdP can use a directory as its account store, but the reverse is not true.
  • Each side has its own signature attack. DCSync (T1003.006) steals credentials from the directory; forged SAML tokens (T1606.002) skip authentication at the IdP entirely. Detection and recovery differ for each.
  • Hybrid adds a third tier 0 system. The synchronisation server and its connector accounts hold directory replication rights and write access to the cloud IdP, so they are as sensitive as a domain controller.
  • Place non-human identities deliberately. Kerberos service accounts belong in the directory with managed passwords; workloads calling cloud APIs belong with the IdP or a workload identity issuer using federation, not shared directory passwords.

The short answer: store of record vs token issuer

A directory service answers "who is this account and what are its attributes?" It holds objects (users, groups, computers, service accounts), their attributes and, usually, their credentials or password hashes. Clients query it with LDAP (RFC 4511) and, in Active Directory, authenticate with Kerberos, which issues tickets valid only inside that realm. An identity provider answers "has this person or workload just proved who they are, and what should I tell the application?" NIST SP 800-63C-4 defines the IdP as the party that authenticates the subscriber and issues assertions to relying parties (RPs), which consume them. In OpenID Connect the OpenID Provider issues an ID Token, a signed JSON Web Token carrying claims such as iss, sub, aud and exp.

So the practical answers to the common questions are:

  • Is LDAP an identity provider? No. LDAP is a directory access protocol. A successful Bind authenticates the client to that LDAP server for that connection, but nothing portable is produced that another application can verify independently.
  • Do I still need a directory if I have an IdP? Every IdP has an account store. In a cloud IdP the directory is built in (Google Cloud Identity, Microsoft Entra ID and Okta Universal Directory each include one, listed alphabetically). You need a separate traditional directory only if you have consumers that speak LDAP, Kerberos, NTLM or Group Policy.
  • What is the difference between a directory and an SSO provider? SSO is a property of the token model: the user authenticates once to the IdP and many applications accept its assertions. A directory alone gives you a shared password, not single sign-on.

Side-by-side comparison

DimensionDirectory serviceIdentity provider
Primary jobStore of record for accounts, groups, attributes and credentialsAuthenticate a subject and issue a signed assertion or token
Typical protocolsLDAP v3 (389, LDAPS 636), Global Catalog (3268, 3269), Kerberos (88), NTLM, MS-DRSR replication, SCIM as a provisioning targetSAML 2.0, OpenID Connect, OAuth 2.0, WS-Federation, SCIM as a provisioning source
What the client receivesBind result, search results, Kerberos tickets usable inside the realmSigned SAML assertion or ID Token with an audience, issuer and expiry
Trust anchorPassword hashes, KRBTGT key, replication permissions, schema and ACLsToken-signing private keys, federation trusts, client registrations
Signature attackDCSync (T1003.006) and Golden Ticket (T1558.001)Forged SAML tokens (T1606.002), trust modification (T1484.002)
Where MFA is enforcedRarely native; usually bolted on at the edge (RADIUS, smart card logon)Native: conditional access, phishing-resistant authenticators, step-up
Key logsDomain controller Security log (4662, 4768, 4769), LDAP access logsSign-in and audit logs, AD FS events (1200, 1202), federation trust changes
Main NHI residentsKerberos service accounts, gMSAs, computer objects, LDAP bind accountsOAuth clients, service principals, federated workload identities

How the two fit together architecturally

Most estates run one of three shapes. Knowing which you have tells you where each control has to live.

Directory-centric (traditional on-premises)

Active Directory is both store and authenticator. Windows logon, file shares and line-of-business applications use Kerberos; network devices and older applications use LDAP binds. If an IdP exists it is AD FS or a similar federation server sitting on the directory, translating a Kerberos or password check into SAML for a handful of web applications. The directory is the single trust anchor, so compromising it compromises everything downstream.

Hybrid (directory feeds a cloud IdP)

The on-premises directory stays authoritative for people and groups and a sync engine pushes objects to a cloud IdP. Microsoft documents three ways to authenticate in this shape: password hash sync (hashes of on-premises passwords are synced and the cloud validates sign-ins), pass-through authentication (on-premises agents validate passwords against AD) and federation (the cloud hands sign-in to AD FS on-premises). The choice decides whether an on-premises outage stops cloud sign-in and whether the cloud can see leaked credentials. Microsoft states that leaked credential detection requires password hash sync and recommends enabling it even when pass-through or federation is the primary method, so it can serve as a fallback. Deeper coverage of this choice is in Identity Federation vs Identity Synchronisation.

Cloud-native (IdP with built-in directory)

The IdP's own directory is the store of record, often fed from HR and pushed to applications with SCIM (RFC 7644, which defines create, read, replace, modify and delete operations over HTTP on /Users and /Groups). Legacy protocol needs are met by a managed domain or a hosted LDAP service. Microsoft Entra Domain Services, for example, is a managed domain synchronised one way from Entra ID; objects synchronised from Entra ID are read-only there, and Microsoft positions it as a bridge for legacy workloads rather than a replacement for on-premises AD.

Which controls live where

The most useful single artefact for an architecture review is a control placement map. Put each control on the side that can actually enforce it; a control placed on the wrong side is either impossible or trivially bypassed.

ControlLives in the directoryLives in the IdPWhy
Account lifecycle (joiner, mover, leaver)Yes, if it is the store of recordYes, in cloud-native designsLifecycle belongs to whichever system is authoritative; the other must follow within minutes
Group membership used for authorisationYesMirrored into claimsApplications see groups only as claims; the source must be governed
Password policy and hash protectionYesYes, for cloud-only accountsWhoever stores the hash owns its protection
MFA and phishing-resistant authenticationSmart card or PKINIT for Kerberos onlyYes, primary locationToken issuance is the natural choke point for step-up and conditional access
Conditional access (device, location, risk)NoYesRequires per-request policy evaluation at issuance time
Session and token lifetimeKerberos ticket policyToken and session policies per applicationEach issuer controls its own artefact lifetime
Token-signing key protectionKRBTGT key rotationSigning key in an HSM or provider-managed store, rollover planTheft of either key lets an attacker mint credentials
Disabled-account enforcementImmediateDepends on sync and token lifetimeWith password hash sync Microsoft documents up to a 30-minute delay for disabled state; locked and expired states are not synced
Legacy protocol hardening (LDAP signing, channel binding, NTLM reduction)YesNoOnly the directory speaks these protocols

Threat model: the directory side

An attacker who controls the directory controls the identities. The main paths are well documented:

  • Credential extraction by replication: DCSync (T1003.006) mimics a domain controller and asks for password data over MS-DRSR. MITRE notes it is available to Administrators, Domain Admins, Enterprise Admins and DC computer accounts, and recommends managing the access control list for "Replicating Directory Changes". The retrieved KRBTGT hash then enables a Golden Ticket (T1558.001). See the Golden Ticket, Silver Ticket and DCSync Guide.
  • Weak binds: RFC 4513 says servers should by default fail unauthenticated binds (a name with an empty password) and should not offer clear-text password mechanisms unless TLS or another confidentiality layer protects the session. Directories that still accept simple binds on port 389 expose service account passwords on the wire. See the LDAP Security Deep Dive Guide.
  • Reconnaissance: any authenticated account can usually enumerate users, groups and service principal names (T1087.002), which feeds Kerberoasting and privilege mapping. See LDAP Reconnaissance Detection.
  • ACL and delegation abuse: write rights on group objects, GPOs or service accounts let an attacker add themselves to privileged groups without touching a password.

Failure mode: directory compromise is usually silent and broad. Recovery means a forest recovery plan, two KRBTGT resets and rebuilding trust in every account; see the Active Directory and Entra ID Recovery Guide.

Threat model: the identity provider side

An attacker who controls the IdP does not need passwords at all: they need the ability to issue a token that relying parties accept.

  • Signing key theft and token forgery: with a SAML token-signing certificate an attacker can forge tokens for any user with arbitrary claims (T1606.002). MITRE lists detection signals such as validly signed assertions with no matching authentication event (Kerberos 4769, AD FS 1200 and 1202) and the same assertion ID used from different places, and recommends rotating the token-signing certificate twice in quick succession after a compromise. The SolarWinds SUNBURST and Golden SAML incident showed forged tokens passing password and MFA checks because the services trusted the signature. The Storm-0558 key breach showed the same lesson at cloud scale: a stolen signing key let tokens be forged that Exchange Online accepted. See the Golden SAML and Federation Trust Abuse Defence Guide.
  • Trust modification: adding a new federated domain or identity provider trust (T1484.002) gives an attacker a second, legitimate-looking token issuer.
  • Application credential abuse: adding secrets or certificates to existing service principals (T1098.001) and stealing application access tokens (T1528) give persistence without any user sign-in.
  • Relying party validation gaps: OpenID Connect Core requires the RP to check that iss matches, that aud contains its client_id, that the signature verifies with the issuer's keys and that the token has not expired. Applications that skip these checks accept tokens issued for someone else. See Identity Federation Failure Modes.

Failure mode: IdP compromise is fast and invisible at the application. Recovery means rolling signing keys, revoking sessions and refresh tokens, and reviewing every trust and application credential.

Hybrid synchronisation: the third tier 0 system

In hybrid estates the sync server bridges the two trust anchors. Microsoft documents that for password hash sync the AD DS Connector account needs Replicate Directory Changes and Replicate Directory Changes All, the same rights DCSync abuses. The Entra Connector account holds the Directory Synchronization Accounts role and writes into the tenant, and the ADSync service account stores the other accounts' passwords encrypted in its database. MITRE tracks tampering with hybrid authentication components as T1556.007 (Hybrid Identity).

Hybrid failure modeEffectControl
Sync server compromisedDirectory replication rights plus write access to the cloud tenantTreat as tier 0, privileged access workstations only, monitor connector account sign-ins. See How to audit the Entra Connect sync account
Pass-through agent tampered withAttacker can observe or approve password validationHarden agent hosts as tier 0; alert on new agent registrations
On-premises outage with pass-through or federationCloud sign-in stopsKeep password hash sync enabled as a documented fallback; Microsoft notes failover from pass-through to hash sync is manual
Disable lagLeaver keeps cloud access for minutes, and longer through existing tokensRevoke sessions on leave; shorten token lifetimes for high-risk apps

Hardening detail for the Microsoft stack is in the Microsoft Entra Connect and Cloud Sync Hardening Guide.

Where service accounts and other NHIs belong

Non-human identities usually outnumber people in both systems, and putting them in the wrong place is a common root cause of incidents.

  • Kerberos and Windows services: keep these in the directory as group managed service accounts so the password is managed automatically. Microsoft's AD FS guidance itself recommends a gMSA for the AD FS service account. See the Windows Services and Service Account Security Guide.
  • LDAP bind accounts: unavoidable for many appliances and legacy applications. Give each consumer its own read-only bind account, require LDAPS or StartTLS, and restrict where it can bind from.
  • Cloud APIs and SaaS integrations: register them with the IdP as service principals or OAuth clients, prefer certificate or federated credentials over client secrets, and give each an owner. See OAuth Apps vs Integration Service Accounts.
  • CI/CD and cross-cloud workloads: neither a directory password nor a long-lived IdP secret; use workload identity federation where the workload presents a short-lived token from its own platform. See Workload Identity Federation vs Static Cloud Keys.

Decision criteria: cloud-only, hybrid or directory-centric

SituationLean towardsTrade-off to accept
New organisation, SaaS-only, no domain-joined WindowsCloud-native IdP with built-in directory, SCIM to appsProvider concentration risk; legacy protocol needs met by a managed service
Kerberos applications, Group Policy, file servers still in useHybrid with directory as source for those consumersThree tier 0 systems to protect: directory, sync, IdP
Regulatory need for on-premises authentication decisionsHybrid with pass-through or federation, hash sync as fallbackMore infrastructure, outage dependency on-premises
Heavy Linux and network device estateLDAP or Linux identity suite as directory, federated to the IdP for web appsTwo account stores to keep consistent
Small organisation with few staff in ITCloud-native, as few self-run identity servers as possibleLess schema and protocol control
Large enterprise mid-migrationShrink the directory to the consumers that need it; move web and API authentication to the IdPLong coexistence period with dual monitoring

Worked scenario: a mid-sized manufacturer

A 3,000-person manufacturer runs a single AD forest, AD FS for 40 SaaS applications, and 600 service accounts, many with passwords that never change. Plant systems use LDAP binds from appliances on port 389. The security team wants to "move to the cloud IdP" and is asked whether AD can be retired.

  1. Classify consumers: the inventory shows 40 SaaS apps (token consumers), 120 Windows servers with Kerberos services, 30 appliances using LDAP binds and 15 pipelines using a directory service account to reach a cloud provider. The directory cannot be retired yet; the IdP role can move.
  2. Move the IdP role: SaaS applications move from AD FS to the cloud IdP one by one. Password hash sync is enabled first so leaked credential detection works and there is a fallback. AD FS is decommissioned and its federation trust removed, which removes one token-signing key to defend.
  3. Harden the directory for what remains: appliances move to LDAPS with per-device bind accounts; Kerberos services move to gMSAs; replication rights are reviewed so only domain controllers and the sync connector hold them.
  4. Move NHIs to the right side: the 15 pipelines switch to workload identity federation and their directory accounts are disabled after a 30-day watch period.

Implementation approach

  1. Map consumers by protocol: list every system that binds over LDAP, uses Kerberos or NTLM, or consumes SAML or OIDC. This tells you which side each control must live on.
  2. Declare the store of record per population: people, groups, devices and each NHI class. Write it down; ambiguity here causes most lifecycle gaps.
  3. Classify tier 0: domain controllers, sync servers and their connector accounts, IdP admin roles, signing keys and federation servers. Restrict administration to privileged access workstations.
  4. Place controls: use the placement table above; close the gaps where MFA exists at the IdP but legacy protocols bypass it.
  5. Pilot changes in audit mode: for LDAP signing or NTLM reduction, log first, fix the consumers that fail, then enforce. For IdP policy changes, use report-only conditional access where available.
  6. Plan rollback: keep password hash sync available as a fallback before changing the authentication method, and document how to revert a sync rule.
  7. Rehearse key compromise: run a tabletop for KRBTGT reset and for signing-key rollover so both are practised before they are needed.

Detection and measurement

  • Directory: replication requests (event 4662 on directory objects with replication rights) from anything other than a domain controller or the sync connector; simple binds over unencrypted LDAP; new members of privileged groups.
  • IdP: federation trust or domain changes, new credentials on service principals, sign-ins with assertions that have no matching authentication event, token lifetimes outside baseline.
  • Sync layer: sign-ins by connector accounts from unexpected hosts, sync rule changes, new pass-through agents.

Metrics that show the split is working:

  • Percentage of accounts with a single declared store of record (target 100%).
  • Number of accounts outside domain controllers and sync connectors holding replication rights (target zero).
  • Percentage of LDAP binds over LDAPS or StartTLS.
  • Median time from directory disable to cloud session revocation for leavers.
  • Percentage of application credentials in the IdP that are certificates or federated rather than secrets.
  • Days since last tested signing-key rollover and KRBTGT reset.

Common failure patterns

  • MFA at the IdP, passwords everywhere else: LDAP and NTLM paths into the same accounts make the IdP's MFA optional for an attacker.
  • Signing keys treated as configuration: token-signing certificates exported, backed up to file shares or never rolled. Microsoft's AD FS guidance warns against storing certificates on network shares.
  • Sync connector with standing replication rights left unmonitored: it holds the same rights DCSync uses, yet is often missing from the privileged account inventory.
  • Disable equals revoke assumption: leavers disabled in the directory keep working cloud tokens because sessions were not revoked.

Framework mapping

FrameworkReferenceDirectory sideIdP side
NIST SP 800-53 Rev 5AC-2 Account ManagementLifecycle in the store of recordLifecycle for cloud-only and app identities
NIST SP 800-53 Rev 5IA-2, IA-5, IA-8Authenticator management for hashes and service accountsMFA, external users, assertion-based authentication
NIST SP 800-53 Rev 5AU-6 Audit Record ReviewDC and LDAP logsSign-in and federation audit logs
NIST SP 800-63C-4Federation assurance levels FAL1 to FAL3Not applicableAssertion signing, audience restriction, injection protection
MITRE ATT&CK v20T1003.006, T1558.001, T1087.002Credential theft and discovery
MITRE ATT&CK v20T1606.002, T1484.002, T1098.001, T1528Token forgery, trust and credential abuse
MITRE ATT&CK v20T1556.007 Hybrid IdentitySync and pass-through components that bridge both

Practitioner checklist

  • Write down the store of record for people, groups, devices and each NHI class.
  • List every consumer by protocol and mark which side each control must live on.
  • Add domain controllers, sync servers, connector accounts, IdP admin roles and signing keys to the tier 0 asset list.
  • Remove replication rights from every account that is not a domain controller or a documented sync connector.
  • Require LDAPS or StartTLS for binds and refuse unauthenticated binds.
  • Protect IdP signing keys in an HSM or provider-managed store and rehearse a double rollover.
  • Enable password hash sync as a fallback where your hybrid design allows it, and document manual failover.
  • Revoke cloud sessions as part of every leaver process, not just directory disable.
  • Move workloads calling cloud APIs from directory passwords to workload identity federation.

Standards and references

Related NHI Mgmt Group resources: Active Directory and Entra ID Hardening Guide · SAML vs OIDC Guide · Zero Trust in Hybrid Active Directory Environments · IAM and IdP Buyer's Guide

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 14 November 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org