# Create a new Active Directory bind policy template with domain binding configuration for macOS devices Create new directory bind template. ## Endpoint `POST /api/v1/mdm/directory/bindpolicytemplates` ## Request ### Request URL `https://{server-hostname}:8383/api/v1/mdm/directory/bindpolicytemplates` ### Scope `MDMDeviceMgmt.CREATE` ### Header `Authorization: d92d4xxxxxxxxxxxxx15f52` ### Request Parameters #### Request Headers - **Content-Type** `string` — Mandatory: `application/json` - **Accept** `string` — Mandatory: `application/json` #### Request Body `application/json` - **name** `string` — Optional Name of the bind policy template - **domain_name** `string` — Mandatory Active Directory domain name to bind the device to (e.g., ad.zylker.com) - **user_name** `string` — Mandatory AD user account with privileges to bind the device to the directory - **managed_password_id** `long` — Mandatory Managed password ID for the AD user account. Configure using [Add Managed Password API](https://www.manageengine.com/products/desktop-central/help/api/onpremise/mac-add-managed-password.html) - **description** `string` — Optional Description of the bind policy template - **create_ma_at_login** `boolean` — Optional Create a mobile account at login. Defaults to true - **warn_before_ma** `boolean` — Optional Warn user before creating a mobile account. Defaults to false - **force_home_local** `boolean` — Optional Force local home directory on startup disk. Defaults to true - **windows_unc_path** `boolean` — Optional Use Windows UNC path to derive network home location. Defaults to true - **preferred_dc_flag** `boolean` — Optional Whether to specify a preferred domain controller. Defaults to false - **preferred_dc** `string` — Optional Preferred domain controller hostname. Applicable only when `preferred_dc_flag` is true - **allow_multi_domain_auth** `boolean` — Optional Allow authentication from any domain in the forest. Defaults to true - **default_shell** `string` — Optional Default user shell path (e.g., `/bin/bash`). Defaults to `/bin/bash` - **namespace** `integer` — Optional AD namespace type. Allowed values: 1 (Domain), 2 (Forest). Defaults to 1 - **mount_style** `integer` — Optional Network home protocol. Allowed values: 1 (SMB), 2 (AFP). Defaults to 1 - **packet_sign** `integer` — Optional Packet signing policy. Allowed values: 1 (Allow), 2 (Disable), 3 (Require). Defaults to 1 - **packet_encryption** `integer` — Optional Packet encryption policy. Allowed values: 1 (Allow), 2 (Disable), 3 (Require), 4 (Require SSL). Defaults to 1 - **trust_pass_interval** `integer` — Optional Trust domain object password interval in days. Defaults to 14 - **adrestrictddns** `array` — Optional List of network interfaces (e.g., en0, en1) for which DDNS updates will be restricted ## Sample Request ```curl curl --request POST \ --url https://appdomain/api/v1/mdm/directory/bindpolicytemplates \ --header 'Accept: application/json' \ --header 'Authorization: d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/json' \ --data '{"force_home_local":true,"windows_unc_path":true,"default_shell":"/bin/bash","allow_multi_domain_auth":true,"trust_pass_interval":14,"user_name":"bindadmin","preferred_dc_flag":false,"adrestrictddns":["en0","en1"],"description":"Template for binding Mac devices to corporate AD","mount_style":1,"domain_name":"ad.zylker.com","packet_encryption":1,"name":"Corporate AD Bind Template","namespace":1,"create_ma_at_login":true,"packet_sign":1,"managed_password_id":9007199254741000,"warn_before_ma":false}' ``` ### Sample Request Body Create a new AD bind policy template ```json { "force_home_local": true, "windows_unc_path": true, "default_shell": "/bin/bash", "allow_multi_domain_auth": true, "trust_pass_interval": 14, "user_name": "bindadmin", "preferred_dc_flag": false, "adrestrictddns": [ "en0", "en1" ], "description": "Template for binding Mac devices to corporate AD", "mount_style": 1, "domain_name": "ad.zylker.com", "packet_encryption": 1, "name": "Corporate AD Bind Template", "namespace": 1, "create_ma_at_login": true, "packet_sign": 1, "managed_password_id": 9007199254741000, "warn_before_ma": false } ``` ## Response ### Response Parameters #### HTTP Code 200 Response Body — `application/json` - **bind_policy_id** `long` Unique identifier of the created bind policy template - **name** `string` Name of the bind policy template - **domain_name** `string` Active Directory domain name - **user_name** `string` AD user account used for binding - **managed_password_id** `long` Managed password ID for the AD user account. Configure using [Add Managed Password API](https://www.manageengine.com/products/desktop-central/help/api/onpremise/mac-add-managed-password.html) - **description** `string` Description of the bind policy template - **type** `integer` Bind policy type. 1 indicates Traditional AD - **create_ma_at_login** `boolean` Create a mobile account at login - **warn_before_ma** `boolean` Warn user before creating a mobile account - **force_home_local** `boolean` Force local home directory on startup disk - **windows_unc_path** `boolean` Use Windows UNC path to derive network home location - **preferred_dc_flag** `boolean` Whether a preferred domain controller is specified - **preferred_dc** `string` Preferred domain controller hostname - **allow_multi_domain_auth** `boolean` Allow authentication from any domain in the forest - **default_shell** `string` Default user shell path - **namespace** `integer` AD namespace type. 1 = Domain, 2 = Forest - **mount_style** `integer` Network home protocol. 1 = SMB, 2 = AFP - **packet_sign** `integer` Packet signing policy. 1 = Allow, 2 = Disable, 3 = Require - **packet_encryption** `integer` Packet encryption policy. 1 = Allow, 2 = Disable, 3 = Require, 4 = Require SSL - **trust_pass_interval** `integer` Trust domain object password interval in days - **adrestrictddns** `array` List of network interfaces for which DDNS updates are restricted ### Possible Response Codes - **200** — HTTP code ### Sample Response: HTTP 200 Bind policy template successfully created ```json { "force_home_local": true, "windows_unc_path": true, "default_shell": "/bin/bash", "allow_multi_domain_auth": true, "trust_pass_interval": 14, "user_name": "bindadmin", "preferred_dc_flag": false, "adrestrictddns": [ { "restricted_interface": "en0" }, { "restricted_interface": "en1" } ], "description": "Template for binding Mac devices to corporate AD", "type": 1, "preferred_dc": "", "mount_style": 1, "domain_name": "ad.zylker.com", "packet_encryption": 1, "name": "Corporate AD Bind Template", "namespace": 1, "create_ma_at_login": true, "packet_sign": 1, "bind_policy_id": 9007199254741050, "managed_password_id": 9007199254741000, "warn_before_ma": false } ``` ## Rate Limits ![](https://www.zohowebstatic.com/sites/zweb/images/people/ico-help.png) **Duration:** 1 minute | **Threshold:** 30 | **Lock period:** 5 minutes Duration - Time window for the threshold. Threshold - Number of API calls allowed within the specified duration. Lock Period - Wait time before consecutive API requests.