An Okta API mock for testing user activation.
Start Victor’s seeded account in STAGED status and ask your agent to activate it. A user check reads the account’s final status and expects ACTIVE.
victor_activeuser victor@acme.example; status ACTIVE
Starting records
users
- login
victor@acme.example- status
STAGED- title
Data Engineer
users
- login
ancha@acme.example- title
Automation service account
users
- login
mike@acme.example- title
VP of Customer Operations
users
- login
rachel@acme.example- title
Site Reliability Engineer
Connect your agent to the Okta mock
When ancha runs your agent, it sets:
OKTA_ORG_URLOKTA_API_TOKEN
Point the client you already use at them.
import okta from '@okta/okta-sdk-nodejs';
const client = new okta.Client({ orgUrl: process.env.OKTA_ORG_URL, token: process.env.OKTA_API_TOKEN });
for await (const user of await client.userApi.listUsers()) console.log(user?.profile?.login);Locally, ancha runs your agent as an ordinary process, so keep real Okta credentials out of its environment.
See all 31 endpoints
apps
/api/v1/apps/api/v1/apps/{appId}/api/v1/apps/{appId}/groups/api/v1/apps/{appId}/groups/{groupId}/api/v1/apps/{appId}/groups/{groupId}/api/v1/apps/{appId}/users/api/v1/apps/{appId}/users/api/v1/apps/{appId}/users/{userId}groups
/api/v1/groups/api/v1/groups/api/v1/groups/{groupId}/api/v1/groups/{groupId}/api/v1/groups/{groupId}/api/v1/groups/{groupId}/users/api/v1/groups/{groupId}/users/{userId}/api/v1/groups/{groupId}/users/{userId}logs
/api/v1/logsusers
/api/v1/users/api/v1/users/api/v1/users/{id}/api/v1/users/{id}/api/v1/users/{id}/api/v1/users/{id}/appLinks/api/v1/users/{id}/groups/api/v1/users/{id}/lifecycle/activate/api/v1/users/{id}/lifecycle/deactivate/api/v1/users/{id}/lifecycle/reset_password/api/v1/users/{id}/lifecycle/suspend/api/v1/users/{id}/lifecycle/unlock/api/v1/users/{id}/lifecycle/unsuspend/api/v1/users/{id}/sessionsSeed your own data
The data the Okta mock starts with on every run, cut to a few records. ancha twins seed okta prints every field.
Full seed YAML
twins:
- okta
seed:
okta:
org:
subdomain: acme
name: Acme
admin: ancha@acme.example
users:
- login: ancha@acme.example
firstName: Ancha
lastName: Assistant
created: -1500h
lastLogin: -1h
title: Automation service account
department: IT
- login: mike@acme.example
firstName: Mike
lastName: Turner
created: -9000h
lastLogin: -3h
title: VP of Customer Operations
department: Leadership
employeeNumber: "1004"
- login: rachel@acme.example
firstName: Rachel
lastName: Moore
created: -6000h
lastLogin: -2h
title: Site Reliability Engineer
department: Engineering
employeeNumber: "1012"
- login: victor@acme.example
firstName: Victor
lastName: Lane
status: STAGED
created: -26h
title: Data Engineer
department: Data Platform
employeeNumber: "1031"
groups:
- name: On-call
description: Primary and secondary on-call rotation
created: -5000h
members:
- rachel@acme.example
apps:
- name: slack
label: Slack
created: -8800h
groups:
- Everyone
events:
- type: user.lifecycle.deactivate
at: -300h
actor: mike@acme.example
message: Deactivate Okta user
Check what your agent did
Checks YAML
checks:
- id: victor_active
state:
okta.user: victor@acme.example
status: ACTIVEMore identity tools
All 43 toolsOkta API mock FAQ
What status should I expect after activating an Okta user?
In Ancha’s Okta mock, POST / accepts a STAGED or DEPROVISIONED user. The user becomes ACTIVE if they have a password, or PROVISIONED otherwise.
How can I verify that an offboarding agent suspended an Okta user?
For an ACTIVE user, the mock’s / changes status to SUSPENDED. It updates statusChanged and records a user.lifecycle.suspend System Log event.
Is adding the same user to an Okta group twice safe to retry?
For an OKTA_GROUP, repeating PUT / in the mock returns 204 and keeps one membership. The group.user_membership.add event is created on the first addition.
Install the CLI and run your agent against the Okta mock.
Ancha is not affiliated with Okta.