feat: support activate=false on create_user to enable STAGED users#38
Open
stephen-bailey-carta wants to merge 1 commit intookta:mainfrom
Open
feat: support activate=false on create_user to enable STAGED users#38stephen-bailey-carta wants to merge 1 commit intookta:mainfrom
stephen-bailey-carta wants to merge 1 commit intookta:mainfrom
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an optional
activate: bool = Trueparameter to thecreate_usertool. When set toFalse, the user is created inSTAGEDstatus (no activation email, no provisioning workflows fire). Default behavior is preserved.Fixes #37
Motivation
The Okta Users API supports
activate=falsevia a query parameter, producing users inSTAGEDstatus. This is the standard starting state for: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_usernow acceptsactivate: bool = Trueand passes{"activate": str(activate).lower()}asquery_paramstoclient.create_user. Docstring updated.Testing
Verified against a live Okta org by creating a user with
activate=falsevia the underlying SDK call and confirminguser.status == UserStatus.STAGED. Test user was cleaned up immediately after.