okta-core-management-api
Use when working with the Okta core (Workforce/Customer Identity) Management REST API or the official Python SDK — base URL and domain patterns, SSWS API tokens vs OAuth 2.0 scoped access tokens, Private Key JWT for service-to-service auth, exposed resource objects, cursor pagination and rate-limit headers, System Log polling, and the official `okta` PyPI package's architecture, coverage, and known gaps. Triggers on "Okta REST API", "Okta Management API", "okta-sdk-python", "pip install okta", "SSWS token", "Okta OAuth scopes", "Okta System Log", "Okta rate limit", "Okta pagination".
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 5
- Forks
- 3
01 前言 Front Matter
- name
- okta-core-management-api
- description
- Use when working with the Okta core (Workforce/Customer Identity) Management REST API or the official Python SDK — base URL and domain patterns, SSWS API tokens vs OAuth 2.0 scoped access tokens, Private Key JWT for service-to-service auth, exposed resource objects, cursor pagination and rate-limit headers, System Log polling, and the official `okta` PyPI package's architecture, coverage, and known gaps. Triggers on "Okta REST API", "Okta Management API", "okta-sdk-python", "pip install okta", "SSWS token", "Okta OAuth scopes", "Okta System Log", "Okta rate limit", "Okta pagination".
03 SKILL.md 正文
Okta Core Management API & Python SDK
Reference for the Okta core platform's REST API and its official Python SDK, current as of the
sources this skill was distilled from (mid-2026 snapshot — verify version numbers against
developer.okta.com and PyPI before relying on them, since both the API and SDK ship continuous
updates).
Coverage snapshot
The Okta core (Workforce/Customer Identity) platform has full coverage on all three integration
dimensions as of the source snapshot: a mature REST/Management API authenticated by SSWS token or
OAuth 2.0; an official Python SDK on PyPI (package okta); and an official Okta-published MCP
server (okta/okta-mcp-server, announced September 22, 2025) — though that MCP server is still
distributed source-only via uv/Docker (not on PyPI) and Okta itself still labels it beta. See
okta-mcp-server-landscape for the full MCP picture.
REST API basics
- Base URL pattern:
https://{yourOktaDomain}/api/v1/{resource}.{yourOktaDomain}is a tenant-specific subdomain, e.g.integrator-1234567.okta.com(free developer orgs) oracme.okta.com/acme.oktapreview.com/acme.okta-emea.comin production. All requests must be HTTPS. - The API is versioned and uses HAL/JSON hypermedia (
_linksfor navigation) — seedeveloper.okta.com/docs/reference/core-okta-api/. - Pagination: cursor-based via an
afterquery parameter (limitup to 200). Always follow the response'sLinkheader for the next page rather than constructing your ownsince/untilor offset URLs — this is true for both general resource listing and System Log polling. - Rate limiting: 429 responses include an
X-Rate-Limit-Resetheader. Well-behaved clients also watch theX-Rate-Limit-Remainingheader on every response and back off before hitting 429, rather than only reacting after the fact.
Authentication: two schemes
- SSWS API token — sent as
Authorization: SSWS {token}. Okta's own documentation now recommends against this for new work: per the Postman setup guide (developer.okta.com/docs/reference/rest/), "Okta doesn't recommend using the Okta-proprietary SSWS API token authentication scheme. This API token scheme allows you to access a broad range of APIs because there's no scope associated with the token. Access to the APIs depends on the privileges of the user that created the API token. The API token also has a fixed expiry date." Treat SSWS as acceptable only for short-lived scripts, never as the authentication backbone of a persistent service. - OAuth 2.0 scoped access tokens — issued by the org authorization server at
https://{yourOktaDomain}/oauth2/v1/token. Sent asAuthorization: Bearer {access_token}. Service-to-service apps should use Private Key JWT (client_credentialsgrant). Scopes are granular — representative examples:okta.users.read,okta.groups.manage,okta.policies.manage,okta.logs.read,okta.apps.manage. Always request the narrowest scope set the calling code actually needs, and treat*.managescopes as requiring more scrutiny than*.read.
Resource surface (representative, not exhaustive)
Users, Groups, Applications, Sessions, Factors/Authenticators, Policies & Policy Rules (sign-on, password, MFA, authentication, access), Authorization Servers (with Scopes, Claims, Access Policies, Policy Rules), System Log, Devices, Brands/Themes/Custom Pages, Email Templates/Domains, Custom Domains, Identity Providers, Network Zones, Trusted Origins, Roles & Resource Sets, Event/Inline Hooks, Schemas, Realms.
Endpoint path examples that appear across real integrations: /api/v1/users, /api/v1/groups,
/api/v1/apps, /api/v1/policies, /api/v1/devices, /api/v1/authenticators,
/api/v1/behaviors, /api/v1/trustedOrigins, /api/v1/zones, /api/v1/logs (System Log),
/api/v1/org (whoami/org info), /api/v1/authorizationServers (Auth Servers, Scopes, Claims,
Policies, Rules), /api/v1/brands (Brands, Themes, Email Customizations, Email Domains, Domains),
/api/v1/flows (Okta Workflows folder list, export-as-zip, import, delete — see the caveat on
Workflows below), /api/v1/iam (Custom Roles, Resource Sets, Role Targets, Role Assignments),
/api/v1/security/events/providers (Shared Signals Framework / ITP event providers), and the
ITP-specific policy endpoints under /api/v1/policies for entity-risk, post-auth, and
session-violation policy types.
Note on Okta Workflows: the /api/v1/flows endpoint only supports folder-level list/export
(zip)/import/delete — there is no API to modify Workflows logic inside a flow. Any tool that
manages Workflows folders via the API can only really do drift-detection on the exported bundle
(compare by hash), not field-level create/update of flow contents.
System Log polling pattern
The canonical, safe way to consume the System Log for near-real-time event ingestion:
GET /api/v1/logs?after={cursor}, always in ascending order.- Follow the response's
Linkheader for continuation — never hand-constructsince/untilquery parameters, since Okta's own guidance and real-world integrations both treatLink-header following as the only supported pagination contract for this endpoint. - Persist the cursor after every processed batch (not just at the end of a run) so that a crash or restart resumes exactly where it left off rather than skipping or re-processing events.
- Okta may return up to 1,000 events per page.
The official Python SDK — okta
- Install:
pip install okta. Do not confuse this withokta-sdk-python(hyphenated) on PyPI — that is an inactive community fork (last release 0.2.1 as of the source this was distilled from) and is not the maintained package. The maintained package name isokta. - Version snapshot (verify current values on PyPI before relying on them — this package ships
frequent regens): the source this skill was distilled from recorded the latest release as
3.4.2, dated April 15, 2026, with a PyPI dependency specifier of
Python >=3.10. Watch for drift between docs and package metadata here: some older GitHub README/contributor docs reference "Python 3.9+" while the live PyPI specifier on 3.4.2 requires 3.10+ — trust the installed package's actualRequires-Pythonmetadata over prose docs if the two disagree. - Repository:
github.com/okta/okta-sdk-python, Apache-2.0, maintained by Okta. - Architecture (v3.x): a breaking rewrite from v2.x. The SDK's own CHANGELOG states: "The SDK
has been regenerated using the v5.1.0 Okta Management OpenAPI specifications, bringing support
for new endpoints and enhanced functionality across the API surface." The generation toolchain is
named explicitly in Okta's contributor guide (
developer.okta.com/code/contribute-sdk/): "OpenAPI Generator: openapi-generator-cli version 7.7.0." Models moved from a customOktaObjectbase class to PydanticBaseModelsubclasses; modules moved fromokta/resource_clients/tookta/api/. Every list method returns a(data, response, error)tuple, with_with_http_infovariants available when you need raw response headers (e.g. to readX-Rate-Limit-Remainingyourself). - Coverage: the Okta Management API surface only — Users, Groups, Apps, Policies, Factors/Authenticators, System Log, Devices, Brands, Authorization Servers, etc.
- Auth support: SSWS token (
config={'orgUrl': ..., 'token': ...}) or OAuth 2.0 Private Key JWT — but the SDK's own README states this OAuth support is only for service-to-service applications (verbatim: "This SDK supports this feature (OAuth 2.0) only for service-to-service applications."). It does not implement user-context OAuth flows (authorization code, etc.) — for those, use the Sign-In Widget or AuthJS instead. - Known gaps (verify current status before relying on the absence of these — SDKs evolve):
- Does not wrap the Identity Governance (
/governance/api/v1|v2) endpoints — separate OpenAPI spec, separate URL prefix. Seeokta-iga-governance-apifor that surface. - Does not cover the legacy Authentication (
/api/v1/authn) primary-auth flows as a first-class citizen — those are typically driven through the Sign-In Widget or AuthJS instead. - Coverage of newly released Management endpoints lags spec releases until the SDK's next regeneration/release cycle.
- A separately-named PyPI package,
okta-sdk-python(with hyphens), exists and is an inactive community fork (last release 0.2.1) — do not use it; the supported package isokta.
- Does not wrap the Identity Governance (
Practical guidance
- Default to OAuth 2.0 Private Key JWT with narrowly-scoped
okta.*.readscopes for any long-lived integration; add*.managescopes per-task rather than provisioning them broadly up front, and audit which scopes are actually exercised periodically. - Reserve SSWS tokens for throwaway scripts and local experimentation only — never wire them into a production service, given Okta's own recommendation against the scheme and its lack of scoping.
- Always follow
Linkheaders for pagination (both general resource lists and the System Log) — never hand-roll offset math against Okta's cursor-based pagination contract. - Before assuming the official Python SDK covers an endpoint, check whether it's a Management API
path (
/api/v1/...) or a Governance path (/governance/api/...) — only the former is in scope for theoktapackage as of this snapshot.
04 同仓库更多 Skills
white-paper-writing
Use when writing white papers, technical reports, policy documents, thought leadership pieces, or any long-form authoritative document. Triggers on requests to write, structure, outline, or review white papers, technical reports, position papers, policy briefs, or evidence-driven arguments. Also use for B2B content marketing strategy, technical documentation requiring authority, academic-style reports, or any document that must educate while persuading. Use when someone asks "how should I structure this" for a long-form document.
prose-technical-mechanics
Use when editing or writing prose at a technical/mechanical level: choosing between Anglo-Saxon and Latinate diction, placing information in topic vs stress positions, writing periodic vs cumulative sentences, handling sentence rhythm, punctuation as logic, transitions, paragraph structure, or phonesthetics. Use when someone wants to understand WHY prose works or doesn't, not just surface-level style advice. Triggers on word choice, sentence structure, emphasis, rhythm, diction, or any deep writing mechanics question.
prose-mechanics
Use when writing, editing, or analyzing prose style; when trying to avoid generic AI-sounding writing; when applying specific prose styles such as journalistic, academic, narrative, KJV biblical, Hemingway plain, Latinate/Jamesian, Orwellian, Augustan, Victorian, Early Modern (Bacon, Browne, Milton), or free indirect discourse; or when coaching someone on writing voice and mechanics. Triggers on any request to improve, analyze, or write in a specific prose style, to fix "AI-sounding" writing, to make prose more vivid or concrete, to vary sentence rhythm, or to understand how a particular writer achieves their effects.
narrative-structure
Use when structuring stories, pitches, presentations, white papers, or any persuasive narrative; analyzing the hero's journey in fiction or non-fiction; applying StoryBrand for business communication; designing narrative arcs for thought leadership; or understanding Vogler, Snyder, Propp, or Campbell frameworks. Triggers on any narrative structure, storytelling, pitch structure, StoryBrand, hero's journey, three-act structure, Freytag, Save the Cat, narrative arc, or "how should I structure this story/pitch/presentation" request.
legal-brief-writing
Use when writing legal briefs, motions, or any court filing; when analyzing judicial cognition and persuasion; when applying elite brief-writing techniques from Roberts, Clement, Kagan, Garner; or when structuring legal arguments for maximum persuasion. Also use for autistic/neurodivergent advocates who need to understand how their natural communication style maps to elite legal advocacy. Triggers on any legal writing, brief drafting, motion preparation, or legal argument structuring request.
journal-publishability-criteria
Use whenever a research paper, article or preprint is being written, revised, reviewed or published, and specifically before every publication of docs/paper.md. Covers what legitimate journals actually gate on, in order of gating — the editor's desk screen (scope, novelty, package problems), what reviewers judge (methodological soundness, claims the evidence can carry, statistical and qualitative reporting), EQUATOR reporting guidelines, the ICMJE authorship criteria, COPE's view of text recycling, the near-universal generative-AI policy (no AI author, disclosure, author responsibility), TOP 2025 transparency standards, how to verify a journal is legitimate, submitting without an institution, and a pre-submission checklist. Triggers on requests to evaluate, review, prepare or submit a paper, to judge publishability, to write a declarations or data-availability section, to disclose AI use, or to check a journal.