deactivate_user
Deactivate a user account in Alteryx Server by providing the user ID to disable access and manage permissions.
Instructions
Deactivate a user account
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_id | Yes |
Implementation Reference
- src/tools.py:474-483 (handler)Core handler function in AYXMCPTools class that implements the logic for deactivating a user: checks if user exists, calls the Alteryx Users API users_deactivate_user, and formats the response.def deactivate_user(self, user_id: str): """Deactivate a user by their ID""" try: user = self.users_api.users_get_user(user_id) if not user: return "Error: User not found" api_response = self.users_api.users_deactivate_user(user_id) return pprint.pformat(api_response) except ApiException as e: return f"Error: {e}"
- src/mcp_server.py:276-279 (registration)MCP tool registration using @self.app.tool() decorator in the register_tools method of the MCP server, which delegates execution to the tools.deactivate_user method.@self.app.tool() def deactivate_user(user_id: str): """Deactivate a user account""" return self.tools.deactivate_user(user_id)