Skip to content

feat: support activate=false on create_user to enable STAGED users#38

Open
stephen-bailey-carta wants to merge 1 commit intookta:mainfrom
stephen-bailey-carta:feat/ITENG-2521-activate-param
Open

feat: support activate=false on create_user to enable STAGED users#38
stephen-bailey-carta wants to merge 1 commit intookta:mainfrom
stephen-bailey-carta:feat/ITENG-2521-activate-param

Conversation

@stephen-bailey-carta
Copy link
Copy Markdown

Summary

Adds an optional activate: bool = True parameter to the create_user tool. When set to False, the user is created in STAGED status (no activation email, no provisioning workflows fire). Default behavior is preserved.

Fixes #37

Motivation

The Okta Users API supports activate=false via a query parameter, producing users in STAGED status. This is the standard starting state for:

  • Pre-hire / future-dated employee imports
  • M&A user migrations where activation is controlled centrally by HR/IT
  • Bulk imports where you want to validate data before kicking off provisioning workflows

The current tool hardcoded the default (activate=true), firing activation emails immediately on create — blocking any use case that needs staged provisioning.

Changes

  • src/okta_mcp_server/tools/users/users.py: create_user now accepts activate: bool = True and passes {"activate": str(activate).lower()} as query_params to client.create_user. Docstring updated.

Testing

Verified against a live Okta org by creating a user with activate=false via the underlying SDK call and confirming user.status == UserStatus.STAGED. Test user was cleaned up immediately after.

Adds an optional `activate: bool = True` parameter to the create_user
tool. When set to False, the user is created in STAGED status (no
activation email, no provisioning workflows fire). Default behavior is
preserved.

The Okta Users API supports activate=false via a query parameter,
producing users in STAGED status. This is the standard starting state
for pre-hire imports, M&A migrations, and bulk imports where activation
is controlled downstream. The current tool hardcoded the default
(activate=true), firing activation emails immediately on create --
blocking any use case that needs staged provisioning.

Fixes okta#37

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

create_user tool cannot produce users in STAGED status

1 participant