Identity & SSOvendor:oktaEmail OTPUnwrapped Magic LinkCarrier SMS DIDCloud KMS TOTP

Automate Okta OTP, SMS 2FA & TOTP in Browser Use, Playwright & Stagehand

Automate Okta Verify TOTP, Email OTP passcodes, activation magic links, and SMS 2FA for enterprise SSO portal agents.

Curated Stage 4 Extractor Profile (vendor:okta)

Supports both `okta.com` and `oktapreview.com` sandbox tenants, extracting 6-digit passcodes and `/signin/verify`, `/authn/`, `/email/verify`, and `/activate` links.

Matched Sender Domains
okta.comoktapreview.com
Login URL example: https://your-org.okta.com/
Filtered Non-Auth Noise
  • Okta admin system log digests without verification context

1. 60-Second Gmail & Outlook Auto-Forwarding Filter

Don't want to change your existing account email on Okta? Keep your corporate inbox on Okta and forward only verification emails to <identity-slug>@in.sentryrelay.com. Sentry Relay's Stage 2 unwrapper preserves the original Okta sender header automatically (full setup guide).

# Paste into Gmail -> Settings -> Filters -> Create a new filter ("Has the words")
from:(okta.com OR oktapreview.com) ("verification code" OR "passcode" OR "one-time" OR "verify your identity")

# Action: Forward it to -> <your-identity-slug>@in.sentryrelay.com

2. Copy-Paste Okta 2FA Automation Snippets

Choose your browser automation stack below. All snippets resolve codes in <200ms with Upstash Redis 15-second lookback protection so arrived-before-wait race conditions never fail a run.

import { test, expect } from '@playwright/test';
import { SentryRelay } from '@sentryrelay/sdk';

const relay = new SentryRelay({ apiKey: process.env.SENTRY_RELAY_API_KEY! });

test('Okta SSO login with Email OTP or Okta TOTP', async ({ page }) => {
  await page.goto('https://your-org.okta.com/');
  await page.fill('input[name="identifier"]', process.env.OKTA_USERNAME!);
  await page.click('input[type="submit"], button[type="submit"]');
  await page.fill('input[name="credentials.passcode"]', process.env.OKTA_PASSWORD!);
  await page.click('input[type="submit"], button[type="submit"]');

  // Option A: Okta Email OTP challenge
  const auth = await relay.wait('okta-sso-bot', {
    sender: 'okta',
    timeout: 30,
  });

  if (auth.event?.otpCode) {
    await page.fill('input[name="credentials.passcode"]', auth.event.otpCode);
    await page.click('input[type="submit"], button[type="submit"]');
  }

  await expect(page).toHaveURL(/okta\.com\/app/);
});

3. Okta Production Gotchas

Frequently Asked Questions

Can Sentry Relay bypass Okta Verify mobile push notifications?
Mobile push requires a physical phone tap, so for unattended automation we recommend enrolling RFC 6238 TOTP (Google Authenticator compatible), Email OTP, or SMS OTP in Okta—all three run 100% unattended in Sentry Relay.
Does Sentry Relay work with Okta Preview (oktapreview.com)?
Yes. Both okta.com and oktapreview.com are built directly into the vendor:okta Stage 4 rule.
How does Zero-Edit Forwarding work for corporate Okta emails?
Set up a Gmail or M365 auto-forward rule for Okta emails; Stage 2 strips forwarding wrappers so your scripts can still filter by sender="okta".
Provision an Isolated Identity for Okta

Start free in 3 minutes with @in.sentryrelay.com email + Simulated SMS, or attach a dedicated US carrier Telnyx SMS DID starting on Builder ($29/mo) and Growth/Pro ($79/mo).