# How to configure LDAP for macOS devices

LDAP (Lightweight Directory Access Protocol) is a protocol to access data from the corporate Active Directory over an IP network. You can configure LDAP settings for macOS devices via the UEM console. This will let you sync contacts currently configured in the corporate LDAP server with the Mac machine. The user can access these synced contacts from the contacts app on the device. The LDAP configuration settings policy for macOS devices in Hexnode facilitates an interface for profile setup and deployment.

Configure LDAP settings via management policies
-----------------------------------------------

To sync the contacts on the corporate LDAP server with the device,

1. Login to your Hexnode UEM portal.
2. Navigate to **Policies > New Policy**. Assign a suitable name and description (optional) for the policy. You can also choose to continue with an existing policy.
3. Go to **macOS > Accounts > LDAP**. Click **Configure**.

![LDAP account configuration settings for macOS device management using the MDM](https://cdn.hexnode.com/mobile-device-management/help/wp-content/uploads/2021/05/macos-ldap-account-configurations-as-device-management-settings-in-the-MDM.png)

SettingsDescriptionAccount DescriptionA simple description of the LDAP account, preferably a name, to differentiate between multiple configurations.UsernameThe username that should be used to connect to LDAP. Supports the use of [wildcards](https://www.hexnode.com/mobile-device-management/help/how-to-pass-device-and-user-information-using-the-wildcards-supported-by-hexnode-mdm/) like **%email%** and **%alternateemail%**.PasswordThe password associated with specified LDAP username.Host NameThe DNS host name or the IP address of the LDAP directory server.Use SSLIf enabled, SSL will be used to establish a secure connection between the device and the LDAP server.Associate the policy with macOS devices
---------------------------------------

If the policy is not saved,

1. Navigate to **Policy Targets > +Add Devices**.
2. Choose the target devices and click **Ok**. Click **Save**.

You can also choose to associate the policy with device groups, users, user groups, or domains from the left pane under *Policy Targets*.

If the policy has been saved,

1. Go to **Policies** tab. Choose the desired policy.
2. Click on **Manage** drop-down, select **Associate Targets**.
3. Choose the target entities and associate the policy.

What happens at the device end? 
--------------------------------

When the policy is deployed, the LDAP account will get added on the **Contacts** app. The account settings can be found under **System Preferences > Internet Accounts**.

<https://cdn.hexnode.com/mobile-device-management/help/wp-content/uploads/2020/08/LDAP-configurations-in-macOS-Internet-Accounts.mp4>