unsuspend_user
Reactivates a suspended user in Okta by providing their unique user ID. This tool is part of the Okta MCP Server, enabling user management tasks.
Instructions
Unsuspend a user in Okta
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | The unique identifier of the Okta user |
Implementation Reference
- src/tools/users.ts:637-667 (handler)Handler function that validates input, calls Okta API to unsuspend the user, and returns formatted response.unsuspend_user: async (request: { parameters: unknown }) => { const { userId } = userSchemas.unsuspendUser.parse(request.parameters); try { const oktaClient = getOktaClient(); await oktaClient.userApi.unsuspendUser({ userId, }); return { content: [ { type: "text", text: `User with ID ${userId} has been unsuspended and is now active.`, }, ], }; } catch (error) { console.error("Error unsuspending user:", error); return { content: [ { type: "text", text: `Failed to unsuspend user: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } },
- src/tools/users.ts:45-47 (schema)Zod schema for input validation of unsuspend_user tool.unsuspendUser: z.object({ userId: z.string().min(1, "User ID is required"), }),
- src/tools/users.ts:282-295 (registration)Tool registration entry defining name, description, and JSON input schema.{ name: "unsuspend_user", description: "Unsuspend a user in Okta", inputSchema: { type: "object", properties: { userId: { type: "string", description: "The unique identifier of the Okta user", }, }, required: ["userId"], }, },