Active Directory and LDAP Integration in Okta
A beginner-friendly guide to connecting your company directory to Okta: how the agent works, how users and groups flow in, how passwords are checked, and how to keep the connection safe and healthy.
Most companies already have a list of their people long before they buy a single cloud app. That list lives in a directory, usually Microsoft Active Directory, and it holds every employee, every group, and every password rule. When a new cloud tool arrives, nobody wants to type all those people in again or invent a second set of passwords.
Okta solves this by plugging into the directory you already have. People keep signing in with the same username and password, while Okta handles access to hundreds of apps. This guide explains the basic version of that connection: what each piece does, how the data moves, and which mistakes to avoid. No earlier knowledge of directories is needed.
1What Is Directory Integration?
One sentence version: Okta borrows your directory as its source of people and as its judge of passwords.
A directory is a central database of people and things in an organization, such as users, groups, computers, and the rules that apply to them. Active Directory (AD) is Microsoft’s directory, and it runs inside most mid-size and large companies. LDAP, short for Lightweight Directory Access Protocol, is a common language that programs use to ask a directory questions like “Does this user exist?” and “Is this password correct?” Active Directory speaks LDAP, and so do many other directories.
Okta is an identity provider, which means it is a service that proves who people are to many apps at once. Directory integration is the link between Okta and your directory. It does two basic jobs. First, it imports users and groups so Okta knows who exists. Second, it uses delegated authentication, which means Okta asks the directory to check the password instead of storing the password itself.
Imagine a large office building. The company phone book lists everyone who works there, and the security guard at the old front door knows each person by face. Okta is a new reception desk for a whole street of buildings. It copies the names from the phone book so it knows who belongs, and when someone arrives, it calls the old guard and asks, “Is this really them?” The guard still makes the real decision.
2Directories 101: Active Directory and LDAP Words You Need
A handful of terms will make every later chapter easy to read.
Directory talk is full of short, odd-looking words. Here are the ones you will meet most often, explained in plain language.
| Term | Plain meaning | Why it matters for Okta |
|---|---|---|
| Domain | A named area of the directory, such as a company’s main boundary | Each domain you connect needs its own agent setup |
| Domain controller (DC) | A server that stores the directory and answers sign-in questions | The agent talks to these servers |
| Organizational unit (OU) | A folder inside the directory that groups users or computers | You pick which OUs Okta imports |
| Group | A collection of users, such as “Finance Team” | Groups later decide who gets which app |
| sAMAccountName | The short, older-style username, like jsmith | Often used to build the Okta username |
| User principal name (UPN) | An email-style sign-in name, like jsmith@company.com | A popular choice for the Okta username |
| Distinguished name (DN) | The full address of an object in the directory tree | Appears in logs and import errors |
| Bind | The act of logging in to the directory to run a query | The agent binds to check passwords and read data |
Active Directory versus other LDAP directories
Active Directory is the most common case, so it gets the most attention in Okta. But some companies run other LDAP directories, such as OpenLDAP or an enterprise directory server. Okta supports these through a separate LDAP agent. The ideas are almost the same: import people, then ask the directory to check passwords. The main difference is the data layout, because each directory names its fields a little differently.
If your company says “we use LDAP,” ask which product sits behind it. If the answer is Active Directory, use the AD agent. If it is a different directory server, you will likely need the LDAP agent instead. Picking the wrong one is a very common first-day mix-up.
3Why Connect Okta to Your Directory?
The problems this integration removes are the same ones every growing company runs into.
Without integration, an IT team keeps two lists of people: one in the directory and one in Okta. Someone must create each new hire twice, change each name twice, and disable each leaver twice. Sooner or later, someone forgets one step, and a former employee keeps access to a cloud app for weeks.
Duplicate work
Creating and updating the same person in two places wastes time and creates typing errors.
Password sprawl
A second password for cloud apps means more resets, more sticky notes, and more risk.
Slow offboarding
If a leaver is disabled in the directory but not in the cloud, access lingers.
Unclear source of truth
When two systems disagree about someone’s name or department, nobody knows which one is right.
Integration makes the directory the source of truth, which means the one place everyone agrees is correct. A change made once in the directory flows to Okta, and from Okta to every connected app. This idea is part of what IT teams call the joiner, mover, leaver process: new people join, people move between teams, and people leave. Each event should update access automatically.
Think of a school with one master register. If every teacher keeps a private copy, the lists drift apart within a week. If everyone copies from the master register each morning, the lists always match. The directory is the master register, and Okta is the daily copy that everyone reads from.
4Architecture and Components
The whole design hangs on one small piece of software that sits inside your network.
Okta runs in the cloud, but your directory sits inside your company network, protected by firewalls. Opening the directory to the internet would be dangerous. So Okta uses an agent, a small program you install on a server inside your network. The agent reaches out to Okta, and Okta never reaches in.
| Component | Where it lives | What it does |
|---|---|---|
| Okta org | Okta cloud | Holds users, groups, policies, and app assignments |
| Universal Directory | Okta cloud | Okta’s own user store, where imported people become Okta users |
| Okta AD Agent | A Windows server in your network | Connects Okta to Active Directory for import and password checks |
| Okta LDAP Agent | A server that can reach your LDAP directory | Does the same job for non-AD LDAP directories |
| Domain controllers | Your network | Answer the agent’s questions about users and passwords |
| Service account | Your directory | The identity the agent uses to read data |
| Profile Editor | Okta admin tools | Maps directory fields to Okta fields |
flowchart LR
U["User Browser"] --> O["Okta Cloud: Sign-In and Policies"]
O --> UD[("Universal Directory")]
O |"Outbound HTTPS only"| AG["Okta AD Agent on Windows Server"]
AG --> DC1["Domain Controller 1"]
AG --> DC2["Domain Controller 2"]
O --> APPS["Connected Apps"]
The agent is like a trusted courier who works inside a locked building. Visitors outside cannot walk in, but the courier can leave the building, visit the Okta office, and carry questions and answers back and forth. The building keeps its doors shut the whole time.
Because the agent starts the connection, your firewall only needs to allow outbound web traffic from that one server. No one from the internet can send anything inward. This is one of the biggest reasons security teams accept this design.
5The Okta Active Directory Agent
The agent is small, but it carries the whole integration, so it is worth knowing well.
The Okta AD Agent is a lightweight Windows service. A service is a program that runs quietly in the background without anyone logged in. You install it on a Windows server that is joined to your domain. Many teams use a dedicated member server for this, rather than a domain controller, so that the agent does not compete with the server’s main job. Check Okta’s current guidance for the details that apply to your version.
What the agent does
Import users and groups
It reads the OUs you chose and sends user and group details up to Okta on a schedule or on demand.
Check passwords
When someone signs in to Okta, the agent asks the directory whether the password is correct.
Report health
It keeps a steady connection so Okta can see whether the agent is up or down.
Directory actions
With extra permissions, Okta can ask for password resets and account unlocks to be applied in the directory.
Connection rules
The agent makes outbound web connections to Okta over HTTPS, which is the same secure channel your browser uses for banking. Inside your network, it talks to domain controllers using normal directory traffic such as DNS, Kerberos, and LDAP. Your network team should confirm that the agent server is allowed to reach both sides. If a proxy sits between the server and the internet, the agent can be set up to use it.
Service account
The agent uses a service account, a special directory identity made for software, not for people. For basic import and password checking, this account needs only read access to the OUs you import. You grant more rights only if you want Okta to reset passwords or unlock accounts. Fewer rights mean less damage if the account is ever misused.
Never give the agent’s service account domain admin rights just to make setup easier. If that account is stolen, the attacker owns your whole directory. Use the smallest set of permissions that gets the job done, and write down what you granted.
6LDAP Agent and Related Pieces: Know the Neighbors
Several Okta features have “directory” in their names. This chapter separates them so you pick the right one.
Okta AD Agent
Imports from Active Directory and delegates password checks to it. This is the main subject of this guide.
Okta LDAP Agent
The equivalent for other LDAP directories. It imports people and delegates password checks in the same spirit.
LDAP Interface
Works the opposite way. Okta pretends to be an LDAP server so old apps that only speak LDAP can ask Okta about users.
Desktop single sign-on
Lets users on domain-joined computers reach Okta without typing a password, using their Windows sign-in.
Password synchronization
An optional extra that keeps the directory password and other passwords in step when users change them.
The most common mix-up is between the LDAP Agent and the LDAP Interface. They sound alike, but they point in opposite directions. The agent brings an existing directory into Okta. The interface lets older apps use Okta as if it were a directory. If you need one, you rarely need the other for the same goal.
An import is like moving your contacts from an old phone into a new phone. An LDAP interface is like keeping the new phone’s contacts available to an old gadget that only understands the old address book format. Both involve contacts, but the direction of travel is different.
This guide stays with the basic setup: the agent, import, and delegated authentication. The extras are valuable, but they are best added after the basic version is stable.
7Setup Step by Step
The exact screens change over time, but the order of the work stays the same.
Prepare the server and network
Pick a domain-joined Windows server, make sure its clock is correct, and allow outbound HTTPS to Okta plus normal access to your domain controllers.
Start the directory setup in Okta
In the Admin Console, open the Directory area, choose to add a directory, and pick Active Directory. Okta shows an agent download.
Install and register the agent
Run the installer on the server, name the domain, and sign in with an Okta admin account so the agent can register with your org.
Choose what to import
Select the organizational units that contain the people and groups Okta should see. Start small, then widen.
Decide the Okta username format
Pick how each Okta username is built, for example from the email or the UPN, so every name is unique and recognizable.
Map attributes and review settings
Check which directory fields feed which Okta fields, and decide how new, changed, and removed users are handled.
Run a first import and review matches
Import a small test set, look at the results, and confirm that people landed in Okta as expected before scheduling regular imports.
Test sign-in and add a second agent
Sign in as a pilot user with their directory password, then install a second agent for resilience.
Do the first import with a single test OU holding a handful of pilot users. A wrong filter on a huge OU can create thousands of unwanted Okta accounts, and cleaning them up takes much longer than the setup itself.
Prerequisites worth checking early
- Time sync. Directory sign-in uses Kerberos, which fails when clocks drift too far apart, often by more than a few minutes.
- Name resolution. The agent server must resolve the domain’s DNS names correctly.
- A clean username plan. Decide how usernames will look before importing, because changing them later is painful.
- Admin approval. Get sign-off for the service account and its permissions in writing.
8Importing Users and Groups
Import is how Okta learns who exists. It runs on a schedule and can also be started by hand.
An import is a pass where Okta asks the agent for the current list of users and groups in the chosen OUs, then compares that list with what Okta already knows. There are two kinds. A full import reads everything again, which is thorough but slower. An incremental import reads only what changed since the last run, which is fast and suits frequent schedules, such as hourly.
Matching: new person or existing person?
For every directory user, Okta must decide whether this is someone new or someone it already has. This step is called matching. Okta compares fields such as username or email using rules you set. An exact match links the directory user to the existing Okta user. A partial match may need a person to confirm it. If nothing matches, Okta creates a new user. Admins can choose to confirm exact matches automatically to save time.
flowchart TD
A["Import starts"] --> B["Agent reads users and groups from chosen OUs"]
B --> C{"Does an Okta user already match?"}
C -- "Exact match" --> D["Link and update profile"]
C -- "Partial match" --> E["Hold for admin review"]
C -- "No match" --> F["Create new Okta user"]
D --> G["Apply group memberships"]
E --> G
F --> G
G --> H["Import complete and logged"]
Matching is like a librarian scanning a box of returned books. If the barcode matches a book in the system, it is checked back in. If the title looks the same but the barcode is odd, the librarian sets it aside for a closer look. If no record exists at all, a new entry is made.
Scheduling and scope
Choose a schedule that fits how fast your business needs changes to appear. An hourly incremental import is common for companies that hire often. Daily is fine for smaller, steadier teams. You can always run an import by hand when HR says a new executive starts in ten minutes. Limit the import to the OUs that truly hold employees, so service accounts, test users, and old junk do not arrive in Okta.
9Attribute Mapping and Profile Mastering
Every person has fields, such as name, email, and department. Mapping decides which side owns each one.
An attribute is one piece of information about a user, such as first name, department, or manager. The directory and Okta each have their own list of attributes, with slightly different names. Attribute mapping tells Okta which directory field feeds which Okta field. This is set in the Profile Editor, which is the Okta tool that shows and edits every user profile layout.
| Directory field (example) | Okta field (example) | Why it matters |
|---|---|---|
| givenName | First name | Shown in apps and used in email templates |
| sn | Last name | Used for display names and search |
| Often used for notifications and app sign-ins | ||
| department | Department | Powers group rules and app access by team |
| manager | Manager | Used in approvals and org-aware apps |
| userPrincipalName | Username source | A popular base for the Okta username |
Mastering: who is the boss of this field?
When a person’s data comes from the directory, the directory is said to master their profile. That means a change made in the directory overwrites the same field in Okta at the next import. The fields tied to the directory become read-only in Okta, so admins cannot create a conflict by editing them in two places. If someone needs a name fixed, the fix goes into the directory.
Think about which fields Okta should keep for itself. For example, a field used only by a cloud app can live in Okta alone, while the name and department stay mastered by the directory. Splitting ownership this way keeps both systems tidy.
Choosing the Okta username
The Okta username is how a person identifies themselves at sign-in, and it must be unique in your org. Many companies build it from the email address or the UPN. Others combine the short directory name with the company domain. Pick a format that is stable, because a person’s username is referenced by many apps, and renames can ripple across all of them.
10Delegated Authentication: How Passwords Are Checked
This is the part users feel every day, and the part that makes the whole design clever.
With delegated authentication, Okta does not keep the user’s directory password. When someone types a password into the Okta sign-in page, Okta passes it through the secure channel to the agent. The agent asks a domain controller to verify it, and the answer, yes or no, goes back to Okta. The password stays under the directory’s control.
sequenceDiagram autonumber participant U as User participant O as Okta Cloud participant A as Okta AD Agent participant D as Domain Controller U->>O: Enter username and password O->>O: Find the user and check sign-in policy O->>A: Send the check request over the secure channel A->>D: Ask the directory to verify the password D-->>A: Valid or not valid A-->>O: Return the result O-->>U: Continue to next step or show an error
Picture a hotel receptionist who never holds guests’ room keys. When a guest says they belong in room 204, the receptionist phones the key-card office, which says “yes, that is correct” or “no.” The receptionist can let the guest through, but the secret lives only in the key-card office.
What stays the same for users
The directory’s own rules still apply. If the directory says a password must be changed every 90 days, or an account locks after several wrong tries, those rules still hold, because the directory is the one deciding. A wrong password typed in Okta counts as a failed attempt in the directory, so it can contribute to lockouts. Disabled or expired accounts cannot sign in, as the directory will say no.
Okta’s own checks still run on top
Delegated authentication only answers one question: is the password correct? Okta then applies its own sign-in policies, such as asking for a second factor like an app approval, blocking risky locations, or limiting access by device. The directory decides if the password is right, and Okta decides everything else about whether to let the user in.
If the agent cannot be reached, directory-based users cannot have their password verified, so they cannot sign in with it. This is why running a second agent is not a luxury but a basic safety step.
11User Lifecycle and Data Flow
A person’s record moves from the directory into Okta, onward to apps, and eventually out again.
Here is the typical life of a directory-sourced user. HR creates the person in the directory. The next import brings them into Okta. Group memberships decide which apps they receive. Later, if they change teams, the directory changes, the next import updates Okta, and app access updates with it. When they leave, the directory account is disabled, and the next import reflects that in Okta.
flowchart TD
H["HR creates person in directory"] --> I["Next import brings the person into Okta"]
I --> G["Group membership assigns apps"]
G --> W["Person works and signs in with directory password"]
W --> M{"Role or team changes?"}
M -- "Yes" --> U["Directory updated then Okta updated at next import"]
U --> G
M -- "Person leaves" --> X["Directory account disabled"]
X --> R["Okta reflects the change and access ends"]
| Event in the directory | What Okta does at the next import | What the user sees |
|---|---|---|
| New user created in a chosen OU | Creates the user and applies group rules | A welcome and access to assigned apps |
| Name or department changed | Updates the mapped fields | New details appear in apps |
| Group membership changed | Adds or removes app access based on the group | Apps appear or disappear |
| Account disabled | Reflects the change according to your settings, commonly deactivating access | Sign-in stops working |
| User moved out of imported OUs | May treat the user as removed from scope | Access can end unexpectedly |
Notice the last row. Moving a person to an OU that Okta does not import can look to Okta like they vanished. Plan your OU layout and your import scope together, so that routine directory housekeeping does not accidentally lock people out.
The timing also matters. Because Okta learns about changes at the next import, there is always a delay between a directory change and its effect in Okta. Hourly imports shrink this gap, and manual imports remove it for urgent cases. Password checks, however, always happen live at sign-in, so a disabled directory account fails the password check right away.
12Groups and App Assignment
Groups are how a few directory changes turn into the right access for hundreds of people.
Along with users, Okta can import groups from the directory. An imported group appears in Okta with the same members. You can then assign apps to the group, and every member receives them. When someone joins the “Sales” group in the directory, the next import adds them to the group in Okta, and the sales apps appear for them without any extra work.
Groups work like school class lists. The teacher does not hand a textbook to each child by name. She gives a stack to “Class 5B,” and any child on the list receives one. If a child moves to another class, the list changes and the books follow automatically.
Good habits for groups
- Import only the groups you need. Thousands of old groups clutter Okta and slow reviews.
- Use clear names. A name like “App-Salesforce-Users” tells an auditor exactly what the group is for.
- Separate access groups from email lists. A group built for sending mail may have members who should not have app access.
- Use Okta group rules for extras. Rules can add people to Okta-only groups based on mapped fields, such as department, without touching the directory.
Keep directory groups for “who a person is” and Okta rules or app groups for “what they can open.” This split keeps your directory simple and gives security teams a clear place to review app access.
13Security Considerations
The agent sits between the cloud and your most sensitive internal system, so treat it with care.
The design already has good security habits built in. The connection runs outbound, travels over encrypted HTTPS, and does not require any open inbound port. Passwords are checked by your directory, not stored in Okta. Still, some risks remain, and most of them are about how you run the agent server.
Small service account
Grant read access only to the imported OUs, and add reset or unlock rights only if you truly need them.
Protect the agent server
Patch it, limit who can log in, and monitor it like any server that touches the directory.
Add multi-factor sign-in
A correct password alone should not be enough. Use Okta policies to ask for another proof.
Watch failed attempts
Because wrong passwords count in the directory, attackers can try to lock out real users.
Threats to keep in mind
Password spraying is an attack where someone tries one common password across many accounts, hoping a few users picked it. Okta policies, network zones, and multi-factor rules can slow this down before the directory gets flooded. Service account theft is another risk, which is why the account should be small, monitored, and protected with a long random password that is stored in a secure vault. A third risk is an old agent server that nobody patches because “it just works.” Put it on your regular maintenance list.
The agent server is like the door guard’s booth. The building might have strong walls, but if the booth is left unlocked and the guard’s keys sit on the desk, the walls do not help much. Care for the booth as seriously as the building.
Finally, remember that time matters. Directory sign-in relies on correct clocks. A server with a drifting clock can cause strange, hard-to-find failures. Keep the agent server synced to the same time source as your domain controllers.
14High Availability and Failure Scenarios
Servers fail. A good design makes sure that one failure is a small event, not an outage.
The simplest protection is to install more than one agent for the same domain, on separate servers. The agents work side by side, and Okta can use any healthy one. If one server is rebooted for patching, the others carry on. For larger companies, spread agents across different sites or network segments so that one local problem does not remove all of them.
| What fails | What users and admins see | How to reduce the impact |
|---|---|---|
| The only agent stops | Directory users cannot sign in with passwords, and imports pause | Run at least two agents on separate servers |
| One of two agents stops | Usually nothing noticeable | Alert on agent status and fix quickly |
| A domain controller goes down | Slower or failed checks if the agent cannot find another | Keep several healthy domain controllers and correct DNS |
| Outbound internet blocked | Agent shows as disconnected | Document the required outbound access and test after firewall changes |
| Service account password expires or is locked | Imports and checks fail with permission errors | Set a managed rotation process and monitor the account |
| Bad import scope change | Many users appear removed | Review scope changes before saving and keep a rollback plan |
Some teams keep a small set of cloud-only emergency admin accounts that do not depend on the directory. If the agent fails, someone can still sign in to Okta to investigate. Guard these accounts with strong factors and test them regularly.
Do not forget recovery planning for the human side. Write a short runbook that says who gets alerted, which server to check first, and how to confirm that sign-in is healthy again. A tired engineer at night will thank you for a one-page checklist.
15Monitoring, Logging, and Metrics
A quiet integration is a healthy one, but only if you are watching the right signals.
Okta’s admin tools show the status of each directory integration and each agent, so you can see at a glance whether an agent is active. Beyond that, the System Log, which is Okta’s searchable activity record, shows sign-ins, import activity, and errors. Event names and wording can differ between releases, so search by user, by time, and by the word “agent” or “import” if a specific name does not match. One sign-in event type that often appears for directory users is named user.authentication.auth_via_AD_agent.
Agent status
Is each agent active, and when did it last connect? Alert when any agent is down for more than a few minutes.
Import success and age
Did the last import finish, and how long ago? A stale import means stale access.
Import errors and unmatched users
Counts of failed, skipped, or unconfirmed users show data problems early.
Sign-in failures
A spike in failed password checks can mean an outage, a mass lockout, or an attack.
Useful alerts
- An agent has been disconnected longer than your tolerance.
- No successful import in the last expected window.
- A sudden drop in the number of active users, which may signal a bad scope change.
- A burst of failed directory password checks across many accounts.
On the server side, watch the agent’s Windows service status, disk space, and the event logs of the server. Also track the service account for lockouts. Combining Okta’s view with your own server monitoring catches problems that neither would show alone.
16Advantages, Disadvantages, and Trade-offs
Every design choice has a price. Here is an honest look at both sides.
Advantages
- One source of truth for people and groups.
- Users keep one familiar password.
- Passwords stay in your own directory.
- No inbound firewall holes are needed.
- Joiner, mover, and leaver changes flow automatically.
- Okta adds multi-factor sign-in and app access control on top.
Disadvantages
- You must run and patch an agent server.
- Sign-in depends on the agent being up.
- Changes reach Okta only at the next import.
- Messy directory data becomes messy Okta data.
- Wrong scope or mapping can affect many users at once.
- Failed attempts in Okta can trigger directory lockouts.
Choosing between related options
| Option | Best when | Main cost |
|---|---|---|
| AD agent with delegated authentication | You already run Active Directory and want one password | An agent server to maintain |
| LDAP agent | Your directory is not Active Directory | More care with field names and mapping |
| Cloud-only users in Okta | Small team or no existing directory | No link to internal Windows resources |
| LDAP interface | Old apps must talk LDAP to something | Solves a different problem than import |
The main trade-off is control versus convenience. Keeping passwords in the directory gives you control and familiar rules, but it ties cloud sign-in to a server in your network. Moving fully to cloud-only users removes that dependency, but it is a bigger change that many companies do in stages. Basic integration is a popular first step because it adds the cloud benefits without changing how people think about their passwords.
17Design Patterns and Anti-Patterns
Patterns are habits that work. Anti-patterns are habits that look fine until they hurt.
Patterns that work
Two agents minimum
Run at least two agents on separate servers so patching or a crash never stops sign-in.
Dedicated import OUs
Keep employees in clearly named OUs, so import scope is simple to read and hard to get wrong.
Pilot, then widen
Import a small test group first, verify sign-in and apps, then expand scope in steps.
Directory for identity, Okta for access
Keep names, teams, and managers in the directory, and let Okta policies and app groups decide access.
Anti-patterns to avoid
What it looks like
One agent on one old server, installed years ago by someone who has since left, with a service account that has domain admin rights.
Why it hurts
A single failure stops everyone’s sign-in, nobody knows how to fix it, and a stolen service account gives an attacker the keys to the whole directory.
Better approach
Document the setup, add a second agent, reduce the service account to the minimum rights, and put the server on the regular patching plan.
What it looks like
Importing the entire directory, including service accounts, test users, and former staff, then cleaning up inside Okta later.
Why it hurts
Okta fills with accounts that should never exist there, license counts rise, audit reports get noisy, and mistakes are more likely.
Better approach
Import only the OUs with real people, and clean the directory first so Okta starts clean.
18Best Practices and Common Mistakes
These are the habits that separate a smooth integration from a stressful one.
Clean the directory first
Remove duplicates, fix missing emails, and retire stale accounts before importing. Okta will faithfully copy whatever is there.
Decide the username format early
Pick one stable format and test it against a few tricky names, such as short names, hyphens, and shared surnames.
Use least-privilege accounts
Grant only what the agent needs, record it, and review it every year.
Run two or more agents
Place them on separate servers, and keep them on the same update schedule.
Add multi-factor sign-in
Do not rely on a password alone, even though it is checked by your directory.
Write a short runbook
Cover who owns the integration, how to check agent health, and what to do when imports fail.
Mistakes seen again and again
Installing the agent on a laptop or a test machine that gets turned off. The agent must live on a stable server that stays on and stays patched.
Letting the service account password expire. Imports and sign-in checks quietly fail, and the cause is hard to spot. Set a reminder or a managed rotation process.
Changing import scope on a Friday afternoon. A wrong click can make hundreds of users look removed. Make scope changes early in the week, with a colleague checking the screen.
19Real-World Scenarios
These stories are illustrative, built from common patterns, to show the ideas at work.
A growing company moving to cloud apps
A company of about two thousand people runs Active Directory and adds a dozen cloud apps over two years. They install two agents, import the employee OUs hourly, and assign apps by group. New hires get their apps on day one without extra tickets, and leavers lose access within the hour.
A merger with two directories
After a merger, a business has two separate domains. The team connects each domain to the same Okta org, so all staff can reach the same cloud apps with one sign-in page. They plan carefully for duplicate usernames and use matching rules to avoid confusion.
A company with an older LDAP directory
A manufacturer keeps an LDAP directory for plant systems. They use the LDAP agent to bring people into Okta, then use Okta to protect modern cloud apps. They run into a field-naming surprise during mapping, fix it in the Profile Editor, and move on.
20Troubleshooting Common Problems
Most problems come from a short list of causes. Check these first.
| Symptom | Likely cause | What to try |
|---|---|---|
| The agent will not register | Outbound HTTPS is blocked, a proxy is not set, or the admin account lacks rights | Test connectivity from the server and set the proxy details if one is used |
| The agent shows as inactive | The Windows service stopped, the server is off, or time is wrong | Restart the service, check the server clock, and review local event logs |
| Import finds no users | The wrong OU is selected or the service account cannot read it | Re-check the chosen OUs and the account’s read permissions |
| Duplicate users appear | Matching rules did not link directory users to existing Okta users | Review match settings and confirm partial matches |
| A user cannot sign in | Wrong username format, disabled or locked account, or expired password | Check the account in the directory and compare the Okta username |
| Changes in the directory do not show up | The next import has not run, or the user is outside the import scope | Run a manual import and confirm the user’s OU |
| Many users locked out at once | An attack or a misconfigured app is sending bad passwords | Check the System Log for the source and block it |
| Everyone fails at sign-in at the same time | All agents are down or the domain controllers are unreachable | Check agents first, then the network and domain controllers |
When in doubt, follow the path of the problem. Start with the user’s Okta record, then the agent status, then the domain controller, and finally the network between them. Each hop has its own log, and the first place where the trail goes cold is usually the place where the problem lives.
21Frequently Asked Questions
22Summary and Key Takeaways
Key Takeaways
- Basic integration does two jobs: it imports users and groups from your directory, and it delegates password checks back to the directory.
- A small agent inside your network is the bridge. It connects outbound to Okta, so no inbound firewall holes are needed.
- Pick the right agent. Use the AD agent for Active Directory and the LDAP agent for other LDAP directories, and do not confuse either with the LDAP interface.
- The directory stays the source of truth. Mapped fields are mastered there, and changes reach Okta at the next import.
- Plan scope and usernames carefully. Import only the OUs with real people, and choose a stable username format before the first import.
- Run two or more agents and use least privilege. Resilience and a small service account protect both uptime and security.
- Layer Okta protections on top. Add multi-factor sign-in, monitor agent health and imports, and keep a short runbook ready.