Skip navigation

Duo Security is now a part of Cisco

About Cisco


Synchronizing Users from Azure Active Directory

Learn how to synchronize Duo users and groups from your existing Azure Active Directory (AAD) domain.


Import Duo user information directly from your Azure Active Directory (AD) cloud service into Duo with Duo Security's Directory Sync feature. Directory attributes that may already be populated include name, email address, phone numbers, and group memberships.

The Directory Sync feature is part of the Duo Beyond, Duo Access, and Duo MFA plans.

Directory Sync Updates Existing Users

Before executing any directory synchronization with Duo, understand the effect that synchronization can have on accounts with the same name. Suppose that you already have some active Duo users, and one or more of these users have the same username in Azure. Performing a synchronization will cause the existing Duo users' information to be merged with, and in some cases overwritten by the Azure AD information, such as email addresses in Duo changing to match the value stored in the synced directory.

Likewise, if you are synchronize multiple directories and there are non-unique usernames among those directories, there will be only one Duo user with that username, and each sync will update that Duo user with different information.

The same potential conflict applies to Duo groups. If an existing Duo group has the same name as a synced group, the synced group will overwrite the group information and membership in Duo.


Before setting up Azure AD sync, ensure you have the following:

  • A designated Azure admin service account to use for authorizing the sync. This account needs the Azure Global Administrator role during Duo setup, but you can reduce the service account's role privileges later. This service account may or may not require Azure MFA for admins at login (learn more about the baseline MFA policy for Azure admins).
  • Azure AD groups populated with users to sync.
  • Administrator access to the Duo Admin Panel as an owner, administrator, or user manager (see Admin Roles for more information).
  • An application where users sign in with an Azure AD UPN as their username.

Set Up Synchronization

Add the Directory

To start setting up Azure AD synchronization:

  1. Log in to the Duo Admin Panel and click Users in the left side bar. Then click Directory Sync on the submenu or click the Directory Sync button on the Users page.

    If you have any existing on-premises AD or Azure AD directories configured to sync with Duo, they'll be shown here.

  2. Click the New Directory button to begin the process of adding a directory to Duo.

  3. The "New Directory" page presents the Azure Active Directory tab by default. Click the Authorize button to grant Duo access to read information from your Azure AD domain.

    Authorize Azure AD access

  4. Clicking the Authorize button takes you to the Azure AD portal. Sign in with the designated Azure service administrator account that has the global administrator role for this Azure Active Directory. If required, complete Azure MFA for that service account admin user.

    Sign in to Azure

    Duo does not see or store your Azure Active Directory administrator credentials.

    If you are already signed into to the Azure portal as the Duo service account, you may not be prompted to log in again here.

  5. Once you've signed in to Azure, you must click Accept to grant Duo the read rights needed to import users from your Azure AD domain.

    Grant Azure Permissions

  6. Authorizing the Azure application redirects you back to the "New Directory" page in the Duo Admin Panel. Verify that the "Authorization" section correctly shows your Azure AD organization name. If the page lists the wrong Azure AD domain, click the "Start over?" link to begin again.

    If the domain authorization is correct, enter the information required to create the directory in Duo.

    Directory name Enter a descriptive name for the directory
    Enrollment email

    Select this option if you want imported users to automatically receive an enrollment link email when the sync process completes. Only users imported with active status, a valid email address, and who do not already have any enrolled authentication devices in Duo receive an emailed link. The email address is populated by Azure AD sync from an on-premises Active Directory, or by an Office 365 tenant used with your Azure directory. Default: do not send enrollment emails to imported users.

    The enrollment link sent when the sync first imports a user is valid for 30 days. Duo sends an emailed enrollment reminder if the user hasn't yet completed enrollment after two days, and then a second reminder if the user remains unenrolled eight days after the first reminder.

    If the user does not complete the enrollment process after 30 days has elapsed, the original enrollment link expires and a new enrollment link is generated at the next sync and sent to the user. This entire 30 day cycle repeats until the user completes Duo enrollment.

    The contents of the enrollment email subject and body can be changed on the global Settings page. The enrollment email body should contain the placeholder text "<enrollment-link>", which will be replaced by the link to the enrollment form when the email is sent.

    If your organization uses e-mail filtering, be sure to whitelist the sender

    Import phones

    Enable this option if you want Directory Sync to create phones in Duo using your Azure AD users' Office Phone and Mobile Phone property values. Imported devices default to the Generic Smartphone platform. Default: import no phone information from Azure AD.

    International phone numbers stored in Azure must be prefixed with + and the country code, e.g. +4401617150105 for a UK number.

    If you enable both the "Enrollment email" and "Import phones" options, enrollment links are only sent to users with email addresses who do not have phone information populated in Azure AD.

    Normalize usernames

    When creating a new user from Azure Duo defaults to using the entire Azure user principal name (UPN) as the Duo username (e.g. ""). Enable the username normalization option to use only the unique username portion of the UPN as the Duo username ("narroway" in the example).

    Note that you still need to specify the user's full UPN Azure username to perform an individual user sync from the Admin Panel. The Duo username remains normalized.

    Unlike Active Directory sync, Azure AD sync does not support importing custom attributes or username aliases at this time.

  7. Click in the Groups box to see a list of Azure AD groups available to sync. If you don't see any of your Azure groups listed, review the previous setup steps and correct your configuration.

    Once you see a list of groups, choose the appropriate group or groups. If you start typing an AD group name in the box the list of available groups will match the filter. Members of the groups you choose here will be synced into Duo. Nested groups are supported.

    If you delete and recreate any of the Azure groups saved in the sync properties (even if you reused the same roup name and members), then you'll need to return to the directory sync property page for your Azure domain on the Duo Admin Panel and delete the recreated group from your sync configuration, then re-add the group, and save the directory.

  8. When finished entering these initial fields, click Add Directory to create the new Azure AD directory in Duo and expose additional configuration options.

    Directory Sync

Duo Beyond and Duo Access Plan Users: Global Policy settings affect access to the enrollment portal. Do not apply any global restrictions that could prevent user enrollment. For example, if you configure the User Location policy setting to deny access to a country, then the policy will also block any of your users who attempt to enroll in Duo from that country via a bulk enrollment link. The New User Policy setting for the enrollment portal is always "Require Enrollment".

Perform a Sync

The Sync Now button appears in the upper right hand corner of the Duo Admin Panel after all directory configuration steps have been completed successfully.

Directory Sync Actions

Click Sync Now to run your first sync and immediately import users from Azure into Duo.

Directory Sync in Progress

Otherwise, directory sync runs automatically once a day (at a set time chosen at random). You can always return to the Duo Admin Panel to initiate a manual sync.

Note that once you import users from Azure into Duo you may not change the Azure username. See the FAQ for more information.

Reduce Privileges for the Service Account

When setup is complete you can edit the Duo service account in Azure that you used to authorize the Duo application to drop the account's role privileges to Service Administrator.

Individual User Sync

When you just need to import information for a few users from Azure AD you can use the individual user sync feature instead of syncing the entire directory. For example, you may have a new employee account in Azure who needs a corresponding Duo account, or you might have just disabled an Azure user and need that status carried over to Duo. Syncing these individual user accounts updates Duo immediately.

Type a single Azure user name in full UPN format (such as "") the box at the top of the directory's properties page and click the Sync This User button. The user must be a member of a group specified in the "Choose Groups" section of your directory's configuration. If you try to sync an individual user who is not a member of a selected group then no update occurs (and an existing user just removed from a synced group in the source directory won't be put into Pending Deletion status).

When initiated, the individual user sync verifies that the user is a member of a group currently synced with Duo and then imports information for that user into Duo. The sync creates a new user in Duo or updates an existing user. If you enabled the option to send enrollment emails when adding the directory, then a new user created by the individual user sync receives an email with an enrollment link.

User Enrollment and Activation

After importing users from your directory into Duo, your next step is to have them activate their devices for Duo authentication (if you chose not to send enrollment emails to synced users when creating your directory in Duo). On the Users page you'll see a notification bar indicating that users have not yet activated the Duo Mobile smartphone app. Click the link in the notification bar to begin the process of sending these users activation links.

Activation Links

For more information on user activation, see Activating Users After Enrollment.

If you did choose to send enrollment emails to users synced users automatically, the Pending Enrollments table shows which users created by directory sync or bulk enrollment have not yet completed enrolling their 2FA devices in Duo, along with each user's email address and the expiration date for the enrollment link previously sent. If you need to send the user another copy of the enrollment link email, click the Resend button. Resending the email does not change the current enrollment link's expiration date.

Pending Enrollments

Managing Synced Users

Updating Synced User Information

User attributes synced from an external directory cannot be edited in Duo via the Admin Panel, Admin API, or CSV import. This includes Duo username, real name, email address, phone numbers (if you chose to import phones), and group memberships. Changes to these user attributes should be made in the external directory and then synced over to Duo.

Bypass Status for Synced Users

Users synced from an external directory may have bypass status assigned individually or at the group level. See the Using Groups and User Status Administration documentation for more information.

Disabled Status for Synced Users

Admins can't disable individual Duo users managed by directory sync from the Duo Admin Panel, Admin API, or CSV import. Directory sync checks the user account status in the source directory and uses that information to determine whether the corresponding Duo account should remain enabled.

If a synced user account is disabled in the source directory, the user will be disabled in Duo automatically when the next full or single directory sync occurs. The disabled Duo user is still tagged as a directory user, is read-only, and cannot be manually enabled.

You can restore the disabled Duo account to active status by enabling the account in the source directory and running a sync.

You may disable a group of synced users by changing the status of that group to Disabled. This prevents any user who is a member of that group from logging in with Duo, regardless of that individual user's status. See the Using Groups and Group Status Administration documentation for more information.

Deleting Synced Users

You may not delete a synced user from Duo as long as directory sync is actively managing that user. If a synced directory user is removed from all external directory groups that sync to Duo (or if the user account is deleted from the source directory), the user's status changes to "Pending Deletion" at the next full directory sync and the user can no longer authenticate to Duo. The user's properties are read-only and you are no longer billed for that user.

Locate users pending deletion in the Trash view, accessed by clicking the Trash link underneath the total user count shown at the top of the Users page.

Users in Trash Pending Deletion

If the user marked for deletion is not reconnected to an external directory account via the sync within seven days the user is automatically deleted from Duo. The user's properties show the target date for deletion. A Duo admin can manually delete a synced user from the Trash via the Permanently Delete link at any time during those seven days.

User in Trash

Performing a single user sync against a user removed from a sync group will disable the user but will not put a user into pending deletion. The next full directory sync will apply pending deletion status.

Frequently Asked Questions

Be sure to review frequently asked questions and answers before using Duo's Active Directory synchronization.


Need some help? Take a look at the Azure Directory Sync Frequently Asked Questions (FAQ) page or try searching our Azure Directory Sync Knowledge Base articles or Community discussions. For further assistance, contact Support.

Network Diagram

Azure Sync Network Diagram

  1. Duo requests directory information from Azure.
  2. Users and groups imported to Duo's service.

Ready to Get Started?

Sign Up Free