Create a new Active Directory bind policy template with domain binding configuration for macOS devices

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

Create new directory bind template.

Request URL

https://{server-hostname}:8383/api/v1/mdm/directory/bindpolicytemplates

Scope

MDMDeviceMgmt.CREATECopied!

Header

Authorization: d92d4xxxxxxxxxxxxx15f52

Request Parameters

- Request Headers

Content-TypestringMandatory
application/jsonapplication/jsonCopied!
AcceptstringMandatory
application/jsonapplication/jsonCopied!

- Request Body

application/json
JSON Object
Hide Sub-Attributes
namestringOptional

Name of the bind policy template

domain_namestringMandatory

Active Directory domain name to bind the device to (e.g., ad.zylker.com)

user_namestringMandatory

AD user account with privileges to bind the device to the directory

managed_password_idlongMandatory

Managed password ID for the AD user account. Configure using Add Managed Password API

descriptionstringOptional

Description of the bind policy template

create_ma_at_loginbooleanOptional

Create a mobile account at login. Defaults to true

warn_before_mabooleanOptional

Warn user before creating a mobile account. Defaults to false

force_home_localbooleanOptional

Force local home directory on startup disk. Defaults to true

windows_unc_pathbooleanOptional

Use Windows UNC path to derive network home location. Defaults to true

preferred_dc_flagbooleanOptional

Whether to specify a preferred domain controller. Defaults to false

preferred_dcstringOptional

Preferred domain controller hostname. Applicable only when preferred_dc_flag is true

allow_multi_domain_authbooleanOptional

Allow authentication from any domain in the forest. Defaults to true

default_shellstringOptional

Default user shell path (e.g., /bin/bash). Defaults to /bin/bash

namespaceintegerOptional

AD namespace type. Allowed values: 1 (Domain), 2 (Forest). Defaults to 1

mount_styleintegerOptional

Network home protocol. Allowed values: 1 (SMB), 2 (AFP). Defaults to 1

packet_signintegerOptional

Packet signing policy. Allowed values: 1 (Allow), 2 (Disable), 3 (Require). Defaults to 1

packet_encryptionintegerOptional

Packet encryption policy. Allowed values: 1 (Allow), 2 (Disable), 3 (Require), 4 (Require SSL). Defaults to 1

trust_pass_intervalintegerOptional

Trust domain object password interval in days. Defaults to 14

adrestrictddnsarrayOptional

List of network interfaces (e.g., en0, en1) for which DDNS updates will be restricted

Sample Request

Curl
Java
Python
Deluge
PowerShell
Copied!
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

Copied!
  {
    "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
  }
                
Show full

Response Parameters

- HTTP code 200

Response Body - application/json
JSON Object
Hide Sub-Attributes
bind_policy_idlong

Unique identifier of the created bind policy template

namestring

Name of the bind policy template

domain_namestring

Active Directory domain name

user_namestring

AD user account used for binding

managed_password_idlong

Managed password ID for the AD user account. Configure using Add Managed Password API

descriptionstring

Description of the bind policy template

typeinteger

Bind policy type. 1 indicates Traditional AD

create_ma_at_loginboolean

Create a mobile account at login

warn_before_maboolean

Warn user before creating a mobile account

force_home_localboolean

Force local home directory on startup disk

windows_unc_pathboolean

Use Windows UNC path to derive network home location

preferred_dc_flagboolean

Whether a preferred domain controller is specified

preferred_dcstring

Preferred domain controller hostname

allow_multi_domain_authboolean

Allow authentication from any domain in the forest

default_shellstring

Default user shell path

namespaceinteger

AD namespace type. 1 = Domain, 2 = Forest

mount_styleinteger

Network home protocol. 1 = SMB, 2 = AFP

packet_signinteger

Packet signing policy. 1 = Allow, 2 = Disable, 3 = Require

packet_encryptioninteger

Packet encryption policy. 1 = Allow, 2 = Disable, 3 = Require, 4 = Require SSL

trust_pass_intervalinteger

Trust domain object password interval in days

adrestrictddnsarray

List of network interfaces for which DDNS updates are restricted

Possible Response Codes

200HTTP code

Sample Response: HTTP 200

Bind policy template successfully created

Copied!
  {
    "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
  }
                
Show full

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.