As organizations migrate to cloud services, they often need to maintain existing Active Directory infrastructure while extending modern authentication capabilities to SaaS applications. Okta’s Active Directory Integration synchronizes identities between your on-premises AD and Okta, preserving established user management processes while enabling modern authentication features like SSO and MFA.
Prerequisites
- Okta Organization: Super Admin permissions required
- Active Directory: Domain Admin or equivalent rights
- Network Connectivity: Outbound HTTPS access from AD environment to Okta
- Email Infrastructure: Users must have valid email addresses for activation
Planning Considerations
User Principal Name (UPN) Requirements
Okta usernames must be in email format. If your AD domain uses .local
or non-routable domains, consider adding a routable UPN suffix before synchronization.
Organizational Structure
Plan which Organizational Units (OUs) to synchronize. Creating dedicated OUs for Okta-managed users provides better control and security.
Step 1: Prepare Active Directory Environment
Create Dedicated Organizational Unit
- Open Active Directory Users and Computers
- Right-click your domain and select New > Organizational Unit
- Name the OU (e.g., “Okta Sync Users”)
- Move target users into this OU
Configure UPN Suffixes (If Required)
If your domain uses .local
or non-email domains, add a routable UPN suffix:
# Add routable UPN suffix to forest
Get-ADForest | Set-ADForest -UPNSuffixes @{add="company.com"}
# Update user UPN suffixes
Get-ADUser -Filter * -SearchBase "OU=Okta Sync Users,DC=company,DC=local" |
Set-ADUser -UserPrincipalName {$_.SamAccountName + "@company.com"}
Verify User Email Addresses
Ensure all users have valid email addresses in the mail
attribute:
# Check users without email addresses
Get-ADUser -Filter * -Properties mail -SearchBase "OU=Okta Sync Users,DC=company,DC=local" |
Where-Object {$_.mail -eq $null} |
Select-Object Name, SamAccountName, mail
Step 2: Install Okta AD Agent
Download and Prepare Agent
- Log into Okta Admin Console
- Navigate to Directory > Directory Integrations
- Click Add Directory and select Active Directory
- Download the Okta AD Agent installer
Installation Best Practices
For Production:
- Install on dedicated member servers (not domain controllers)
- Deploy at least two agents for high availability
- Use service accounts with minimal required permissions
For Testing:
- Domain controller installation acceptable for proof-of-concept
Run Installation Wizard
- Execute installer with administrative privileges
- Provide configuration details:
- AD Domain: Select domain to synchronize
- Service Account: Allow automatic creation or specify existing account
- Proxy Settings: Configure if required
- Okta Organization URL: Your Okta tenant URL
Complete Agent Activation
- Copy the activation code provided during installation
- Follow the activation link to complete setup
- Verify agent status in Okta Admin Console > Directory Integrations
Step 3: Configure Directory Synchronization
Select Synchronization Scope
- In the Okta AD Agent configuration, select:
- Organizational Unit: Choose the OU containing target users
- Username Format:
- UPN: If users have email-format UPNs
- Email: If using the mail attribute
Attribute Mapping Configuration
- Allow Okta to scan and discover AD attributes
- Review default attribute mappings:
- firstName:
givenName
- lastName:
sn
- email:
mail
oruserPrincipalName
- login: Based on selected username format
- firstName:
Configure Import Settings
Navigate to Directory Integrations > [Your AD Integration] > Settings:
Import Settings:
- Import Schedule: Configure automatic sync frequency
- Import Scope: Verify OU selection
- Deactivation: Choose behavior for disabled AD users
Advanced Options:
- Group Import: Enable if syncing AD security groups
- Incremental Updates: Enable for efficient synchronization
- Conflict Resolution: Define handling of duplicate users
Step 4: Import and Activate Users
Initial User Import
- Navigate to Directory Integrations > [Your AD Integration] > Import
- Click Import Now
- Select Full Import for initial synchronization
- Review import preview and confirm assignments
Review Imported Users
- Go to Directory > People
- Imported users appear with “Staged for activation” status
- Review user details and attribute mapping accuracy
Activate Users
Individual Activation:
- Select users in Directory > People
- Click Activate
- Users receive activation emails
Bulk Activation:
- Select multiple users
- Choose Activate from bulk actions menu
- Configure welcome email settings
Step 5: Ongoing Management and Monitoring
Monitor Synchronization Status
Check Sync Health:
- Directory Integrations: View last sync status and errors
- System Log: Monitor import events and conflicts
- Agent Status: Verify agent connectivity and health
Common Monitoring Points:
- Failed user imports
- Attribute mapping conflicts
- Agent connectivity issues
- Sync schedule adherence
User Lifecycle Management
User Updates:
- Changes in AD automatically sync to Okta
- Attribute updates reflect based on configured mappings
- Group membership changes sync if group import enabled
User Deactivation:
- Disabled AD accounts can be automatically deactivated in Okta
- Configure deactivation policies in integration settings
Troubleshooting Common Issues
Import Failures
Invalid Email Addresses:
- Verify all users have valid email in mail attribute
- Check UPN format compliance
- Update AD user attributes as needed
Attribute Mapping Errors:
- Review attribute mapping configuration
- Check for required fields missing in AD
- Validate data format requirements
Agent Connectivity Issues
Network Connectivity:
- Verify outbound HTTPS (443) access to Okta
- Check proxy configuration if applicable
- Validate DNS resolution for Okta endpoints
Authentication Problems:
- Verify service account permissions
- Check agent service status
- Review Windows Event Logs
Security Best Practices
Service Account Management
- Use dedicated service accounts with minimal permissions
- Implement regular password rotation
- Monitor service account activity
Network Security
- Restrict agent server access
- Use dedicated VLANs for identity infrastructure
- Implement proper firewall rules
Monitoring and Auditing
- Enable comprehensive logging
- Monitor sync activities and failures
- Regular review of user access and attributes
Advanced Configuration Options
Group Synchronization
- Enable AD security group import
- Map groups to Okta groups
- Configure group-based application assignments
Custom Attribute Mapping
- Map custom AD attributes to Okta profile fields
- Configure expression-based mappings
- Handle complex data transformations
This integration provides a seamless bridge between traditional Active Directory infrastructure and modern cloud-based identity management, enabling organizations to maintain existing processes while gaining advanced authentication capabilities.