Active Directory
The robomotion activedirectory CLI connects to on-premises Active Directory via LDAP for user and group management. It creates, reads, updates, and deletes users; manages groups and group memberships; and handles organizational unit operations.
When to use
- Create, update, disable, or delete Active Directory user accounts
- Manage AD groups and add/remove members
- List and search users or groups in organizational units
- Manage organizational units (OUs)
Prerequisites
robomotionCLI installed- Package installed:
robomotion install activedirectory - Active Directory LDAP connection credentials configured via Robomotion vault
IMPORTANT: Session Mode Required for Multi-Step Operations
Each CLI command runs as a separate process — connection IDs from connect do NOT persist across calls.
You MUST use --session on connect and pass --session-id to all subsequent commands.
Workflow
- Install (once):
robomotion install activedirectory - Connect with session:
robomotion activedirectory ad_connect --session --output json # → {"outClientId":"<client-id>","session_id":"<session-id>"} - Use the returned
client-idandsession-idin all subsequent commands:robomotion activedirectory ad_list_users --client-id "<client-id>" --ou <ou-dn> --session-id "<session-id>" --output json - Disconnect when done:
robomotion activedirectory ad_disconnect --client-id "<client-id>" --session-id "<session-id>" --output json
Always append --output json to get structured JSON results.
Commands Reference
robomotion activedirectory add_user_to_group --access-id --group-object-id --user-id [--opt-tenant-id] [--opt-client-id] --output jsonAdds a user as a member to a group in Azure Active Directoryrobomotion activedirectory connect --tenant-id --client-id --session --output jsonConnects to Azure Active Directory using client credentials and returns an access IDrobomotion activedirectory create_group --func --access-id [--opt-tenant-id] [--opt-client-id] --output jsonCreates a new group in Azure Active Directoryrobomotion activedirectory create_user --func --access-id [--opt-tenant-id] [--opt-client-id] --output jsonCreates a new user in Azure Active Directory with the specified propertiesrobomotion activedirectory delete_group --access-id --group-object-id [--opt-tenant-id] [--opt-client-id] --output jsonDeletes a group from Azure Active Directoryrobomotion activedirectory delete_user --user-id --access-id [--opt-tenant-id] [--opt-client-id] --output jsonDeletes a user from Azure Active Directoryrobomotion activedirectory delete_user_from_group --access-id --group-object-id --user-id [--opt-tenant-id] [--opt-client-id] --output jsonRemoves a user from a group in Azure Active Directoryrobomotion activedirectory get_group --access-id --group-object-id [--opt-tenant-id] [--opt-client-id] --output jsonRetrieves detailed information about a specific group from Azure Active Directoryrobomotion activedirectory get_user --user-id --access-id [--opt-tenant-id] [--opt-client-id] --output jsonRetrieves detailed information about a specific user from Azure Active Directoryrobomotion activedirectory list_all_groups --access-id [--opt-tenant-id] [--opt-client-id] --output jsonRetrieves a list of all groups from Azure Active Directoryrobomotion activedirectory list_all_users --access-id [--opt-tenant-id] [--opt-client-id] --output jsonRetrieves a list of all users from Azure Active Directoryrobomotion activedirectory list_group_members --access-id --group-object-id [--opt-tenant-id] [--opt-client-id] --output jsonRetrieves a list of all members of a group from Azure Active Directoryrobomotion activedirectory update_group --func --group-object-id --access-id [--opt-tenant-id] [--opt-client-id] --output jsonUpdates properties of an existing group in Azure Active Directoryrobomotion activedirectory update_user --func --user-id --access-id [--opt-tenant-id] [--opt-client-id] --output jsonUpdates properties of an existing user in Azure Active Directory
Environment
- ROBOMOTION_API_TOKEN (if vault credentials are needed)