Creates a User Management template to manage local user accounts on Mac target endpoints. The configuration is saved as a reusable template that can be deployed later. Supports creating, modifying, and deleting user accounts, and resetting a password with a saved administrator credential through changePasswordUsing and credentialDetails. Use the returned templateId with the Deploy Configuration Template API to deploy it to targets.
post /dcapi/config-policies/v2/mac/userMgmt
https://{serverurl}/dcapi/config-policies/v2/mac/userMgmt Copied!
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Media type of the request body, as consumed by the endpoint.
Media type of the response body, as produced by the endpoint.
Name of the configuration. Returned as templateName in the response.
Free-text description of the configuration. May be an empty string.
What the configuration is applied to. Must be computer - User Management applies to computers only.
Reapply the configuration at every agent refresh, even when it has already been applied successfully.
Apply the configuration at endpoint startup.
Apply the configuration at the scheduled agent refresh.
Retry the configuration on the endpoint when it fails. noOfRetries sets how many attempts are made.
Honour refreshMinRetry as the minimum gap between two retries at refresh.
Honour logonStartupMinRetry as the minimum gap between two retries at startup or logon.
Number of retry attempts made after a failure. Read only when enableRetry is true.
Minimum number of minutes between two retries at refresh. Read only when enableRefreshMinRetry is true.
Minimum number of minutes between two retries at startup or logon. Read only when enableLogonStartupMinRetry is true.
One entry per macOS user account action - addUser, modifyUser, removeUser or changePassword - applied in the order they appear.
What to do with the account named in userName. Allowed values:
addUser = creates a local account
modifyUser = changes an existing one
removeUser = deletes it
changePassword = resets its password
Disabling, enabling, locking and unlocking are all modifyUser actions driven by isAccountDisabled and isAccountLock - there is no separate disableUser or enableUser action. Mandatory, and matched case-insensitively.
Name of the local account the action applies to. Accepts letters, digits, dot, underscore and hyphen, with no length cap. Mandatory.
Full display name of the account. Read only for addUser and modifyUser.
Description shown against the account on the endpoint. Read only for addUser and modifyUser.
Current password of the account. Read only for changePassword, where it is mandatory when changePasswordUsing is oldPassword unless retainOldUserPassword is true. Sent encrypted and never returned.
Password to set on the account: the initial password for addUser, or the new password for changePassword, where it is mandatory unless retainOldPassword is true. Sent encrypted and never returned.
Hint shown at the login window when the password is entered incorrectly. Read only for addUser and changePassword, and ignored when left empty.
Keep the new password already saved against this configuration instead of applying the value in password. Read for addUser, modifyUser and changePassword, and honoured only while editing an existing template - on a new template there is no saved password to keep. Default: false
Keep the old password already saved against this configuration instead of requiring oldPassword again. Read only for changePassword when changePasswordUsing is oldPassword, and honoured only while editing an existing template. Default: false
Overwrite the account when addUser is used and an account of that name already exists. Read only for addUser. Default: false
Also delete the account home directory from the endpoint. Read only for removeUser. Default: false
Grant the account administrator privileges. Allowed values:
1 = enabled
2 = disabled
3 = not configured
Read only for addUser and modifyUser. Default: 3
Hide the account from the login window. Allowed values:
1 = enabled
2 = disabled
3 = not configured
Read only for addUser and modifyUser. Default: 3
Force the user to change the password at the next login. Allowed values:
1 = enabled
2 = disabled
3 = not configured
Read only for addUser and modifyUser. It cannot be 1 at the same time as userCantChangePassword or pwdNeverExpires. Default: 3
Prevent the user from changing their own password. Allowed values:
1 = enabled
2 = disabled
3 = not configured
Read only for addUser and modifyUser. It cannot be 1 at the same time as userMustChangePassword. Default: 3
Exempt the account password from the expiry policy. Allowed values:
1 = enabled
2 = disabled
3 = not configured
Read only for addUser and modifyUser. It cannot be 1 at the same time as userMustChangePassword. Default: 3
Disable the account. Allowed values:
1 = enabled (the account is disabled)
2 = disabled (the account is usable)
3 = not configured
Read only for addUser and modifyUser - use modifyUser with this flag to disable or re-enable an account. Default: 3
Lock the account out. Allowed values:
1 = enabled (the account is locked)
2 = disabled (the account is unlocked)
3 = not configured
Read only for addUser and modifyUser. Default: 3
Comma-separated local groups the account is added to (e.g., "users,admin"). Read only for addUser and modifyUser. Default: "users"
Comma-separated local groups the account is removed from. Read only for modifyUser.
Home directory path of the account (e.g., "/Users/jdoe"). Read only for addUser and modifyUser. This is the Mac replacement for profilePath - the Windows profilePath, homeFolder, localPath, connectMap, connectMapTo and logonScript fields do not apply here.
How a changePassword action authenticates. Allowed values:
adminCreds = uses the saved credential in credentialDetails
oldPassword = uses the user's existing password passed in oldPassword
Matched case-sensitively, and defaults to oldPassword when omitted.
Saved administrator credential used to reset the password, referenced by credentialID and credentialUUID from List Credentials. Mandatory when changePasswordUsing is adminCreds, and both values must name a credential this login can use - credentialID -1 or credentialUUID -- is rejected. Always use an actual saved credential and avoid using credentialDetails: {credentialID: "-1", credentialName: "", credentialUUID: "--"}. Ignored for every other action.
Identifier of a credential already saved under Admin - Credential Manager. Fetch it from List Credentials. Pass the credentialID together with its credentialUUID; the credential secret itself is never sent through this API.
UUID of the saved credential, used to reference it without transmitting the secret. Fetch it from List Credentials. Must correspond to the credentialID supplied alongside it.
Display name of the saved credential.
Send an email to the addresses listed in email once the deployment finishes.
Notify the endpoint user about this deployment. notificationDuration and notificationEnabledDays are read only when this is true.
Comma-separated email addresses notified about the deployment. May be an empty string when enableEmailNotify is false.
How long a deployment notification stays on screen for the endpoint user. Read only when enableNotification is true.
Number of days for which deployment notifications stay enabled. Read only when enableNotification is true.
curl --request POST \
--url https://appdomains/dcapi/config-policies/v2/mac/userMgmt \
--header 'Accept: application/json' \
--header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
--header 'Content-Type: application/json' \
--data '{"configDetails":[{"action":"addUser","userName":"testuser"}],"label":"Mac User Management Config","configType":"computer"}'Create a local macOS account. userDirectory sets the home directory, and userAsAdmin and userAsHidden take 1 = enabled, 2 = disabled, 3 = not configured.
{
"applyAtRefresh": false,
"applyAlways": false,
"description": "Created through the Config Policies API.",
"label": "Mac User Management Config",
"configType": "computer",
"applyAtStartupLogon": true,
"noOfRetries": 2,
"refreshMinRetry": 1,
"notificationEnabledDays": 3,
"enableLogonStartupMinRetry": false,
"logonStartupMinRetry": 1,
"configDetails": [
{
"addMember": "users",
"userDescription": "Local test account",
"userCantChangePassword": 2,
"isAccountDisabled": 2,
"fullName": "Test User",
"pwdNeverExpires": 2,
"userAsHidden": 2,
"userName": "testuser",
"userAsAdmin": 2,
"userMustChangePassword": 1,
"password": "P@ssw0rd",
"userDirectory": "/Users/testuser",
"overwriteUser": false,
"action": "addUser",
"isAccountLock": 3
}
],
"enableNotification": false,
"enableEmailNotify": false,
"notificationDuration": 6,
"enableRetry": false,
"enableRefreshMinRetry": false,
"email": ""
}
curl --request POST \
--url https://appdomains/dcapi/config-policies/v2/mac/userMgmt \
--header 'Accept: application/json' \
--header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
--header 'Content-Type: application/json' \
--data '{"configDetails":[{"action":"changePassword","userName":"testuser"}],"label":"Reset Mac User Password","configType":"computer"}'Reset the password of a local macOS account. changePasswordUsing selects how the reset authenticates - adminCreds uses the saved credential in credentialDetails, oldPassword requires the user's current password in oldPassword.
{
"applyAtRefresh": false,
"applyAlways": false,
"description": "Created through the Config Policies API.",
"label": "Reset Mac User Password",
"configType": "computer",
"applyAtStartupLogon": true,
"noOfRetries": 2,
"refreshMinRetry": 1,
"notificationEnabledDays": 3,
"enableLogonStartupMinRetry": false,
"logonStartupMinRetry": 1,
"configDetails": [
{
"password": "N3wP@ssw0rd",
"passwordHint": "Quarterly rotation",
"retainOldPassword": false,
"credentialDetails": {
"credentialUUID": "7f3c9a52-4d61-4b0e-9a55-1c2f8d0b6e34",
"credentialID": 12,
"credentialName": "Mac Local Admin"
},
"retainOldUserPassword": false,
"action": "changePassword",
"userName": "testuser",
"changePasswordUsing": "adminCreds"
}
],
"enableNotification": false,
"enableEmailNotify": false,
"notificationDuration": 6,
"enableRetry": false,
"enableRefreshMinRetry": false,
"email": ""
}
Success response returned when the configuration is saved as a reusable template.
Unique identifier of the created template. Pass it to the Deploy Configuration Template API to deploy this template to targets.
Name of the created template. It is the label sent in the request.
Type of configuration the template was created for. Allowed values:
computer
user
Login name of the API user who created the template.
Error response when the request contains invalid or missing required fields.
Product error code. 50003 = CONFIG_INVALID_INPUT_DATA: configDetails is missing or empty, or the configuration could not be resolved for this endpoint. 20003 = SERVICE_NOT_AVAILABLE: the configuration is deprecated for the requested configType.
Localised error message for the error code.
Unauthorized error code returned when authentication credentials are missing, expired, or invalid (authentication=required)
Authentication failure reason
Error response returned when the server does not have enough free disk space to store the configuration files.
Product error code. 170013 = INTERNAL_SERVER_ERROR: raised by the storage pre-check before the template is saved.
Localised error message for the error code.
Rate limit error code returned when the API call threshold (configured via threshold/duration in security XML) is exceeded; client is locked out for lock-period minutes
Rate limit exceeded message with retry guidance
Error response returned when the template could not be saved because of an unexpected server error.
Product error code. 1003 = INTERNAL_ERROR: the template could not be persisted. 50001 = CONFIG_INTERNAL_ERROR: an internal configuration error occurred while processing the request.
Localised error message for the error code.
Success response for macUserMgmt
{
"templateName": "macUserMgmt",
"templateId": 323,
"configType": "computer",
"addedUser": "admin"
}
Error response for macUserMgmt
{
"errorCode": 50003,
"errorMsg": "Some Input field missing in configuration"
}
Success response for macChangePassword
{
"templateName": "macChangePassword",
"templateId": 324,
"configType": "computer",
"addedUser": "admin"
}
Error response for macChangePassword - changePasswordUsing is oldPassword but oldPassword is missing
{
"errorCode": 50003,
"errorMsg": "Some Input field missing in configuration"
}
User is not authorized to create the configuration policy
{
"errorCode": 1001,
"errorMsg": "Access denied - You are not allowed to access the requested resource."
}
Storage pre-check rejected the request before the template was saved
{
"errorCode": 170013,
"errorMsg": "The server machine does not have sufficient disk space. Please free up space and try again."
}
Request rejected because the caller exceeded the configured rate limit
{
"errorCode": "IAM0019",
"url": "/dcapi/config-policies/v2/mac/userMgmt",
"errorMsg": "The URL /dcapi/config-policies/v2/mac/userMgmt was called too many times. Please retry after a while."
}
Unexpected server error while saving the configuration as a template
{
"errorCode": 1003,
"errorMsg": "An Internal Error occurred, try again later."
}
![]()
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.
© 2026, Zoho Corporation Pvt. Ltd. All Rights Reserved.