Skip to main content
Glama
kapilduraphe

Okta MCP Server

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
NameRequiredDescriptionDefault
userIdYesThe unique identifier of the Okta user

Implementation Reference

  • 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,
        };
      }
    },
  • Zod schema for input validation of unsuspend_user tool.
    unsuspendUser: z.object({
      userId: z.string().min(1, "User ID is required"),
    }),
  • 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"],
      },
    },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kapilduraphe/okta-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server