Skip to main content
Irfan_FTNT
Staff
Staff
July 6, 2026

Technical Tip: Syncing Windows AD Users to FortiDLP Console via LDAPS

  • July 6, 2026
  • 0 replies
  • 31 views

Description

This article describes how to integrate an LDAP directory on Windows Server and FortiDLP Console via encrypted communication. The FortiDLP LDAP Sync Tool synchronizes users between the LDAP directory and the FortiDLP Infrastructure. In this article, the LDAP Sync Tool is executed on the Active Directory (AD) server.

The prerequisite to configure LDAP user synchronization can be found in the FortiDLP LDAP Sync Tool Administration Guide.

The AD server must be configured to accept TLS/SSL connections to ensure user synchronization is encrypted via TLS.

  • If LDAPS is not yet enabled on the AD server, follow steps 1–4 to enable it on a Windows Server Domain Controller.

  • If LDAPS is already enabled, skip to step 5 for best practices on configuring the LDAP Sync Tool for a Windows AD server.

To verify the above, connect to the AD server via LDAPS (port 636) using the correct bind, binddn, and password values. This can be done using any LDAP tool.

Scope

 FortiDLP LDAP Sync Tool.

Solution

Step 1. Install the Active Directory Certificate Services Role

  1. Open Server Manager and choose Add Roles and Features.

    eecf0c68.png


  2. On the 'Before You Begin' page, select Next.

    005f9f90.png


  3. When prompted for the installation type, select Role-based or feature-based installation and proceed with Next.

    0eb49c3e.png


  4. Under server selection, pick Select a server from the server pool, highlight the AD server, then select Next.

    7ab0e285.png


  5. From the roles list, tick Active Directory Certificate Services and select Next.

    062f758f.png


  6. A window will appear to add required features; select Add Features.

    702a9289.png


  7. Select through the Features and AD CS information screens using Next.

    41ae79ae.png


    f9cb1e93.png


  8. Under Role Services, check Certification Authority and continue with Next.

    0db009c0.png


  9. Select Install to begin.

    5b712d39.png


  10. After the installation completes, select Configure Active Directory Certificate Services on the Destination Server.

    45a715ac.png


  11. In the configuration wizard, select Next. The current user (a local Administrator) can be used for role configuration.

    2ff06ff4.png


  12. Select Certification Authority as the role service to configure, then select Next.

    3357736d.png


  13. Set the setup type to Enterprise CA and proceed.

    d2c9820c.png


  14. Choose Root CA and select Next.

    a5ddf442.png


  15. Select Create a new private key and proceed.

    948dde0e.png


  16. For the hashing algorithm, choose the most current option available. In this guide, SHA256 is selected. Select Next.

    969070ac.png


  17. Accept the default CA name and select Next.

    fb3fb6e0.png


  18. Set the certificate validity period as needed, then select Next.

    92991316.png


  19. Keep the default database paths and select Next.

    f46943f6.png


  20. Select Configure to apply settings.

    ecf9b98a.png


  1. Then, select Close once it finishes.


d9fcd9e8.png

 

Step 2. Set up a certificate template for LDAPS.

Duplicating and configuring the Kerberos Authentication template.

  1. Press Windows Key + R, type certtmpl.msc, and press Enter to launch the Certificate Templates Console.

  2. Find the Kerberos Authentication template.

    1c4fc844.png


  3. 'Right-click' it, and choose Duplicate Template.

    1bd6df66.png


  4. The Properties of New Template dialog will open. Adjust settings to match the server requirements.

  5. On the General tab, enable Publish certificate in Active Directory. Assign the template a name (e.g., in this article, the name of the certificate template is DC0 LDAPS).

    87fcd1c6.png


  6. On the Request Handling tab, tick Allow private key to be exported.

    4cda0903.png


  7. On the Subject Name tab, set the subject name format to DNS Name, then select Apply and OK.

    1e332277.png


Section 3.  Issue the Certificate Template.

  1. Go to Start -> Certification Authority, 'right-click' Certificate Templates, and select New -> Certificate Template to issue.

    c7cd4ea9.png


  2. Choose the template created in the previous step (e.g., DC0 LDAPS) and select OK.

    ed383d00.png

 

Step 4. Request a new certificate.

  1. Press Windows Key + R and type mmc.

  2. Navigate to File -> Add/Remove Snap-in.

    00549e37.png


  3. Select Certificates and select Add.

    7c361dae.png


  4. Choose Computer account and select Next.

    2d4f15ee.png


  5. Select Local computer, select Finish, then OK.

    eeb80715.png


  6. Expand Certificates (Local Computer) -> Personal -> Certificates.

  7. 'Right-click' Certificates and go to All Tasks -> Request New Certificate.

    abc3f1f1.png


  8. Select Next twice to move through the wizard ('Before You Begin' and Select Certificate Enrollment Policy page).

    694e863d.png


    809b6a2e.png


  9. Select the template from the previous steps and select Enroll.

    a06062ab.png


  10. Once enrolment completes, select Finish.

    f486d1f2.png


  11. The certificate will now appear under Certificates (Local Computer) -> Personal -> Certificates.

    6cb7969b.png

     

Step 5. Creating the configuration file for the Windows AD server.

Below is an example of config.yaml file which provides a sample configuration for syncing users from a Windows Active Directory (AD) server to the FortiDLP Console.

During the sync, these user attributes are imported - each can be found under ldap-config.sync.schemes in the configuration file:

  • sid.

  • username.

  • email address.

  • unix.


---
# FortiDLP Web UI URL
# Ensure to remove `<` and `>`
apiurl: <FortiDLP Console URL>
# The API token generated from https://region.fortidlp.forticloud.com/#admin/tokens
# Ensure to remove `<` and `>`
apitoken: <FortiDLP Console API access token>
# Disable TLS verification for the connection to FortiDLP Cloud
skiptls: false
# The maximum number of retries that can occur after a failure connecting to
# the Infrastructure or LDAP server, or syncing users.
maxretries: 1
# Whether to include LDAP photos when syncing. User photos are given by the image attribute.
photosync: false

# The configuration details for the LDAP directory to download users from.
ldap-config:
  name: adserver
  credentials:
    addr: adserver.ad.company.uk
    port: 636
    base: OU=admin,DC=example,DC=com
    binddn: OU=admin,DC=example,DC=com
    bindpassword: Password123
    tlsconfig:
      # The TLS encryption method
      # 0: Uses TLS
      # 1: Uses StartTLS.
      method: 0
      skipverification: false
      # The CA certificate should be in PEM format
      # either as a single line, escaped with 
 for each new line,
      # or using YAML | multi-line string formatting with indentation
      rootcabundle: |
        -----BEGIN CERTIFICATE-----
        <PEM contents of certificate>
        -----END CERTIFICATE-----



  # The optional configuration details for the LDAP directory
  sync:
    searchterm: "(&(objectCategory=person)(objectClass=user)(objectSid=*))"
    keyfields:
      name: displayName
      email: email
      image: thumbnailPhoto
      title: title
      department: department
      manager: manager
      phonenumbermobile: mobile
      phonenumberoffice: telephoneNumber
      addresshome: homePostalAddress
      addressoffice: physicalDeliveryOfficeName
      schemes:
        - scheme: sid
          attribute: objectSid
        - scheme: username
          attribute: sAMAccountName
        - scheme: unix
          attribute: uidNumber
        - scheme: mail
          attribute: email
    # label mappings to automatically create and assign labels to users based on LDAP properties
    labelfields:
      - key: department
      - key: city
      - key: country
      - key: memberOf
        labelname: Security Group
        match: ^CN=([^,]+),OU=Security Groups,DC=example,DC=com
        transform: $1
        anonymise: false


To complete the setup:

  1. Update the sample configuration file to reflect the server's environment.

    • apirul.

    • apitoken.

    • name.

    • addr.

    • base.

    • binddn.

    • bindpassword.

    • rootcabundle.

    • sync (optional) if targeting a specific group of users.

  2. Once updated, run the following command in the server terminal:

 .\ldap-sync