Overview
The Portal API allows you to generate secure, time-limited links that give your customers access to the WorkOS Admin Portal. This enables self-service configuration of SSO, Directory Sync, Domain Verification, and other enterprise features.Methods
generateLink
Generates a one-time-use Admin Portal link for an organization.Configuration for the portal link
Portal link response
Example - SSO Configuration
Example - Directory Sync
Example - Domain Verification
Available Intents
audit_logs
audit_logs
Allows organizations to configure Audit Logs settings and export preferences.
domain_verification
domain_verification
Enables domain verification for email-based SSO discovery and organization membership.
dsync
dsync
Provides setup and configuration for Directory Sync integrations (Azure AD, Okta, Google Workspace, etc.).
log_streams
log_streams
Configures real-time log streaming to external services.
sso
sso
Allows organizations to set up SAML or OIDC Single Sign-On connections.
certificate_renewal
certificate_renewal
Facilitates renewal of SSO certificates before they expire.
bring_your_own_key
bring_your_own_key
Enables customers to use their own encryption keys for data security.
Best Practices
Use
returnUrl to redirect users back to your application after they finish or exit the portal. Use successUrl to redirect them after successful completion of a specific configuration task.Related Resources
SSO
Configure SSO connections programmatically
Organizations
Manage organizations and their settings
Directory Sync
Work with Directory Sync data and connections
Audit Logs
Manage audit log events