SYNERGY
Chapters

14.5Resources and operations

Last updated

The node offers nine resources. The tables below list every operation. The permission column names the permission the API key's role needs; Chapter 11, Users, roles and permissions, explains permissions.

User

OperationWhat it doesPermission
Get ManySearches users under a Base DN, with an optional LDAP Filter and extra Properties to return.ad:users:read
Get By IDReads one user.ad:users:read
Search by StateFinds users in a given State (see below), optionally under a Base DN and with an Additional LDAP Filter.ad:users:list
Get GroupsLists the groups the user is a member of. With Recursive on, nested groups are followed and every group the user effectively belongs to is returned. Neither mode includes the primary group (normally Domain Users).ad:groups:read
Get Authorization GroupsLists every group in the account's access token (Account ID), including the primary group and well-known groups that a member-of read does not show.ad:groups:read
CreateCreates a user with User Name, User Path (the container), User SAM Account Name, optional User Password, Account Policy and User Attributes.ad:users:create
UpdateChanges User Attributes and Account Policy flags, and changes the logon name when SAM Account Name is given.ad:users:update
Enable / DisableEnables or disables the account.ad:users:update
UnlockClears a lockout. Safe to repeat; the output's wasLocked says whether the account was actually locked.ad:users:update
Reset PasswordSets a new password without knowing the old one.ad:users:update
Change PasswordChanges the password by supplying the Current Password and New Password. It is enforced against password history and minimum age, unlike a reset.ad:users:update
Set Account ExpirationSets the date the account expires (Set Expiry Date with Expires At), or clears it (Clear Expiry).ad:users:update
Assign Group / Assign GroupsAdds the user to one group, or to the groups listed in an array of the input item.ad:groups:update
Unassign Group / Unassign GroupsRemoves the user from one group, or from several.ad:groups:update
Clear GroupsRemoves the user from all groups it can be removed from.ad:groups:update
Delete By IDDeletes the user.ad:users:delete

Search by State accepts these states: Disabled, Enabled, Expired, Inactive, Locked Out, Password Expired, Password Must Change, Password Never Expires and Password Not Required. For Inactive, set Inactive Days to 15 or more: Active Directory updates the last-logon timestamp only about every 14 days, so a shorter period gives misleading results. Leave Base DN empty to search the whole domain.

For the operations that take several groups (Assign Groups, Unassign Groups), set Array Property to the name of the property in the input item that holds the array (default groups), and ID Key to the property inside each array element that holds the group's GUID (default id).

Note: The Reset Password operation shows a Must Change Password At Logon switch, but the gateway currently ignores it. To make the person choose a new password at their next sign-in, follow the reset with a User > Update that sets Account Policy > Change Password At Logon.

Group

OperationWhat it doesPermission
Get ManySearches groups under a Base DN.ad:groups:read
Get By IDReads one group.ad:groups:read
Get MembersLists the members. With Recursive on, nested groups are followed and only the leaf members are returned.ad:groups:read
CreateCreates a group with Group Name, Path, Group Category (Security or Distribution), Group Scope (Global, Domain Local or Universal) and Group Attributes.ad:groups:create
UpdateChanges the group's attributes, and optionally its Group Category and Group Scope.ad:groups:update
Assign Member / Assign MembersAdds one member (Member ID), or several from an array in the input item (Array Property, default members, and ID Key).ad:groups:update
Unassign Member / Unassign MembersRemoves one member, or several.ad:groups:update
Clear MembersRemoves every member.ad:groups:update
Delete By IDDeletes the group.ad:groups:delete

Computer

OperationWhat it doesPermission
Get ManySearches computer accounts under a Base DN.ad:computers:list
Get By IDReads one computer account.ad:computers:read
CreateCreates a computer with Name, Path, SAM Account Name (a trailing $ is added if missing), optional Password, Account Policy and Computer Attributes.ad:computers:create
UpdateChanges Computer Attributes and Account Policy flags, and the logon name when SAM Account Name is given.ad:computers:update
Enable / DisableEnables or disables the computer account.ad:computers:update
Reset PasswordSets a new password for the computer account.ad:computers:update
Delete By IDDeletes the computer account.ad:computers:delete

Organizational Unit

OperationWhat it doesPermission
Get Many / Get By IDSearches or reads organizational units.ad:ous:read
CreateCreates an organizational unit with Name, Path and Attributes.ad:ous:create
UpdateChanges attributes.ad:ous:update
Delete By IDDeletes the organizational unit.ad:ous:delete
Preview Account Enable/DisableShows what enabling or disabling (Action) the accounts in the unit would change, without changing anything.ad:ous:read, plus ad:users:read for users and ad:computers:list for computers
Enable Accounts / Disable AccountsEnables or disables the accounts in the unit.ad:ous:read, plus ad:users:read and ad:users:update for users, ad:computers:list and ad:computers:update for computers

The three account operations take an OU ID, Account Kinds (Users, Computers or All) and Scope (Only This OU, or Include Sub-OUs). The preview returns toChange, alreadyInState, excluded (each with a reasonCode and a reason) and exceedsLimit.

Some accounts are never changed with their unit: domain controller accounts, the Kerberos service account (krbtgt), the built-in Administrator, Guest and DefaultAccount, and system-critical objects. A disable also leaves out the account the connection signs in with and the gateway server's own computer account. The preview lists them under excluded.

Important: Enabling or disabling all the accounts in a unit waits for a person's approval unless the API key is set to Act without asking.

At most 100 accounts are changed in one run. A larger selection is refused as a whole with OrganizationUnitAccounts.TooMany; it is never split. Narrow the kinds or the scope, or run the preview first and check exceedsLimit.

A run is not transactional: if some accounts fail, the others still change. The node then emits one item whose top level carries success (true only when nothing failed), partialFailure, total, succeeded and failed, with the per-account outcomes under batch.items. Branch on {{ $json.partialFailure }}, or turn on Fail on Partial Failure to make the item fail instead. Accounts that changed before a failure stay changed either way.

Object

The Object resource works with any directory object, including types without their own resource such as contacts.

OperationWhat it doesPermission
Get ManySearches objects of an Object Type (Computer, Contact, Group, Organizational Unit or User) under a Path, with an optional LDAP Filter and Other Attributes to Select.ad:objects:read
Get By IDReads one object by its ID, optionally with an Object Class and extra Properties.ad:objects:read
CreateCreates an object of an Object Type with Object Name, Path and Attributes.ad:objects:create
UpdateApplies Attribute Patches: Add, Replace, Remove and Clear, each naming an attribute and, except for Clear, a value.ad:objects:update
MoveMoves an object into New Parent Distinguished Name.ad:objects:update, or the type's own update permission when Expected Class is set
RenameRenames an object to New Object Name.ad:objects:update, or the type's own update permission when Expected Class is set
Delete By IDDeletes the object.ad:objects:delete
Run Saved SearchRuns a saved LDAP filter chosen from Saved Filter Name or ID.savedfilters:read, plus ad:objects:read (or savedfilters:execute when the search runs on the server)
Search by Saved SearchRuns a saved search on the server, chosen from Saved Search Name or ID.savedfilters:execute

Move and Rename have an optional Expected Class (Computer, Group, Organizational Unit or User). When it is set, the gateway refuses the operation if the ID belongs to an object of another class, so a wrong ID cannot move or rename the wrong object. This is strongly recommended for moves, because a move changes the object's distinguished name. Renaming changes only the object's name in the directory tree; it does not change the logon name (sAMAccountName or userPrincipalName).

Saved searches are the shared saved LDAP filters described in Chapter 8, Saved LDAP filters. The drop-down lists the filters the API key can see, which needs savedfilters:list. For a filter that covers all object types, or one without a base DN, Run Saved Search automatically runs it on the server.

Security

OperationWhat it doesPermission
Get ACLReads an object's access control list. Explicit Entries Only hides inherited entries.ad:acl:read
Get Many Delegation TemplatesLists the named delegation templates.ad:acl:read
Get Many DelegationsReports which delegation templates are present on a container, per trustee. Complete Delegations Only hides partial matches.ad:acl:read
Apply DelegationGrants a trustee the rights a delegation Template defines on a container (Object ID). Choose the trustee with Trustee By, then Trustee Object ID or Trustee SID.ad:acl:delegate; templates that amount to full control also need ad:acl:manage
Revoke DelegationRemoves the entries a delegation template defines for a trustee.ad:acl:delegate
Set Deletion ProtectionTurns "protect from accidental deletion" on or off for an organizational unit (Organizational Unit ID, Protect).ad:acl:manage
Get Service Principal NamesReads the SPNs of a user or computer (Object Class, Object ID).ad:spn:manage
Set Service Principal NamesReplaces the complete set of SPNs on a user or computer.ad:spn:manage
Important: Apply a delegation to the narrowest container that covers the actual need. A password-reset delegation at the domain root reaches every account in the domain, including administrative ones. Writing an SPN makes the account a Kerberos service target.

Raw edits of individual access control entries, the owner and inheritance are deliberately not offered in the node. They are available only through the REST API (see Chapter 15).

Service Account

OperationWhat it doesPermission
Get ManyLists service accounts of a Kind (Both, Group Managed or Standalone). Unusable Only returns only group managed accounts that name no password-retrieval principals, which no host can use.ad:serviceaccounts:list
GetReads one account (Service Account ID), with the principals allowed to retrieve its password.ad:serviceaccounts:read
Get KDS ReadinessReports whether the domain has the KDS root key a group managed service account needs.ad:serviceaccounts:list
CreateCreates a Group Managed (gMSA) or Standalone (MSA) account with a Name (up to 15 characters), optional Retrieval Principal IDs and Additional Fields. The kind cannot be changed later.ad:serviceaccounts:create
UpdateChanges the Description, DNS Host Name, Enabled state or Service Principal Names under Update Fields. Only the fields you add are changed.ad:serviceaccounts:update
DeleteDeletes the account. Every service running as it stops authenticating.ad:serviceaccounts:delete
Get Many Password Retrieval PrincipalsLists who may retrieve a group managed account's password.ad:serviceaccounts:read
Set Password Retrieval PrincipalsReplaces that list with Principal Object IDs and Principal SIDs. This hands out a usable credential.ad:serviceaccounts:update
Get Many Computer Service AccountsLists the standalone accounts linked to a computer (Computer ID).ad:serviceaccounts:read
Set Computer LinkLinks or unlinks (Linked) a standalone account and a computer. Linking alone does not make the account usable: it still has to be installed on the machine itself.ad:serviceaccounts:update

Additional Fields on Create are Description, DNS Host Name, Managed Password Interval (Days), Path, SAM Account Name and Service Principal Names. For a group managed account, the Managed Password Interval (Days) defaults to 30 and cannot be changed afterwards: Active Directory fixes it at creation. If Path is empty, the account is created in the domain's Managed Service Accounts container. SAM Account Name defaults to the name, with a trailing $ added. A group managed account needs a DNS Host Name to be usable. Service principal names are entered as a comma-separated list.

Directory Context

These operations only read. They return information about the directory the binding points to, and need ad:directory:read.

OperationWhat it returns
Get Directory ContextThe full directory context in one item.
Get DomainThe domain.
Get ForestThe forest, its domains, functional level and UPN suffixes.
Get Root DSEThe RootDSE, including the configuration and schema naming contexts.
Get Domain ControllersThe domain controllers with their site, roles and global catalog flag.
Get Sites / Get Subnets / Get Site LinksThe replication topology.
Get TrustsThe domain trusts with their direction, type and SID filtering state.
Get Optional FeaturesOptional features such as the Active Directory Recycle Bin, and whether each is enabled.
Get KDS Root KeysThe KDS root keys needed before a group managed service account can be created.

Operation

The Operation resource works with operations the gateway has queued for approval. It is how a workflow follows up a change that is waiting for a person.

OperationWhat it does
Get By IDReads one of your own operations by its Operation ID.
Get WaitingLists your own operations that are waiting for approval, with Return All, Limit and an optional Search on the operation name.
Wait for ApprovalPolls an operation until it is decided, expires or the timeout passes.

All three need operations:waiting:list, and they only ever show operations made with the same API key's owner — never anybody else's.

Last updated

Did this page help you?