Skip to lesson
Exit
The Interview Loop, Stage by Stage1 / 2

1 min lesson

Technical screen #1 - scripting + identity fundamentals

Use the example in "Technical screen #1 - scripting + identity fundamentals" to explain the main idea in plain words.

Step 1 of 2

Sixty minutes that split in two: a live scripting problem and deep, configuration-level questions on identity. Both are graded as a senior engineer, which means trade-offs and failure modes, not textbook definitions.

The scripting half is usually realistic IT automation, not algorithm puzzles. Expect to call a REST API to reconcile users between systems, parse a log to find an anomaly or script a provisioning step. They watch how you write it: idempotent, error-handled and safe to re-run.

The shape they want: idempotent, paginated, error-handled - not a one-shot script that breaks on the second run
import os, requests

BASE = "https://your-org.okta.com/api/v1"
HEADERS = {"Authorization": f"SSWS {os.environ['OKTA_TOKEN']}"}

def get_all_users():
    """Page through every active user, following Okta's Link header."""
    users, url = [], f"{BASE}/users?filter=status eq \"ACTIVE\"&limit=200"
    while url:
        r = requests.get(url, headers=HEADERS, timeout=30)
        r.raise_for_status()
        users.extend(r.json())
        url = r.links.get("next", {}).get("url")  # pagination, not a magic page count
    return users

def ensure_in_group(user_id, group_id):
    """Idempotent: PUT is safe to re-run; adding an existing member is a no-op."""
    r = requests.put(f"{BASE}/groups/{group_id}/users/{user_id}",
                     headers=HEADERS, timeout=30)
    r.raise_for_status()

Narrate the choices as you go. Mention pagination so you don't silently drop users past page one, rate-limit handling for 429s, secrets pulled from the environment not hardcoded and the fact that re-running the script can't double-provision anyone.