Bootstraps Azure automation when az login is blocked by Conditional Access (error 530035). Mints a service principal via Microsoft Graph from a portal session, then provisions resource groups and AI resources via az/REST, writing keys to SCS vault.
Ships in web-forge. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Azure's Portal and CLI are different Entra applications. A Conditional Access policy scoped
to the CLI (04b07795-8ddb-461a-bbee-02f9e1bf7b46) leaves the portal
(c44b4083-3bb0-49c1-b47d-974e53cbdf3c) working, and az login has no --client-id override —
so when the CLI is blocked, the browser session is the only door. Walk through it once, mint a
service principal, and every later run is unattended: client-credentials auth is not gated by user
Conditional Access.
Self-Evolving Skill: the Azure Portal drifts. On real, reproducible breakage fix the scripts AND append to the Vendor Quirks log in
../dashboard-forge/SKILL.md— immediately, not later.
Observed 2026-08-02 on a real client migration:
Error Code: 530035 App name: Microsoft Azure CLI
Device state: Unregistered App id: 04b07795-8ddb-461a-bbee-02f9e1bf7b46
…while portal.azure.com signed the same account in without complaint. Two traps followed, both
worth knowing before you start:
az account list returned []. That is a consequence of the block, not evidence that no
subscription exists. The portal showed an active subscription with the user as Owner.user_domain#EXT#@tenant.onmicrosoft.com). Guests get no app-registration
rights by default — they need Application Developer/Administrator, and an RBAC role at the target
scope. If minting fails with 403, that is the reason, and it needs a tenant admin, not a retry.The first version of this drove the portal's DOM and it was a disaster — see the Portal Quirks below. The fix was not better selectors. The portal's own Graph token carries the scopes needed to do the whole job over REST, measured on a live session:
Application.ReadWrite.All · AppRoleAssignment.ReadWrite.All · RoleManagement.ReadWrite.Directory
So captureBearer(page, "graph.microsoft.com") off the wire, then plain HTTP. Zero selectors, zero
blade navigation, nothing to drift. This is the plugin's Hybrid rule taken to its limit: the browser
contributes a token, not clicks.
| Step | How | Browser? |
|---|---|---|
| Sign in (incl. MFA) | human, in the visible Chrome | yes, once |
| Capture Graph + ARM tokens | captureBearer() off real requests | passive |
| Identity preflight | decodeJwtClaims() → assertIdentity() | no |
| Create app registration | POST /v1.0/applications | no |
| Create service principal | POST /v1.0/servicePrincipals | no |
| Create client secret | POST /v1.0/applications/{id}/addPassword | no |
| Assign Contributor | PUT …/roleAssignments/{guid}?api-version=2022-04-01 | no |
| Everything afterwards | az as the service principal | no |
cd plugins/web-forge/skills/azure-provision
node scripts/mint-sp.mjs specs/example.json # browser opens; sign in; the rest is REST
node scripts/provision.mjs specs/example.json # unattended: RG + resources + keys → vault
Both are idempotent (GET before POST). Re-running adopts what exists. The DOM version was not, which is exactly how a duplicate app registration got created.
| Trap | What happens |
|---|---|
| Ambiguous accessible names | Every close button is "Close content '<Blade Title>'", so getByRole("button", {name:/register/i}).first() hits close, not submit. It reports a successful click and creates nothing. Use clickExact(), which refuses and lists candidates |
| Two search boxes | The masthead search matches input[placeholder*="Search"] before any blade's own filter. Anchor on the specific placeholder |
| A list view can lie | After a successful create, Owned applications said "This account isn't listed as an owner of any applications" — true for a guest creator, and utterly misleading. Ground truth is the notifications pane or All applications |
| Tokens are not in localStorage | This generation of MSAL SPA keeps them in memory. Capture off the wire |
| Cached blades issue no request | Token capture then silently yields null, which reads like "no permission". captureBearer retries with a reload |
A key that returns HTTP 200 on a trivial call proves nothing. The acceptance checks are:
mint-sp.mjs polls the client-credentials flow
directly (never az login -p <secret> — that puts the secret in argv, readable via ps).
RBAC is eventually consistent: expect ~15–60s of "not yet". Do not read that as failure.provision.mjs writes key + endpoint (+ region) to the vault as one unit, and the schema requires
it. This is not tidiness: a rotation that moved the key but left the endpoint as a hardcoded literal
elsewhere produced HTTP 401 — Access denied due to invalid subscription key or wrong API endpoint
in production. Emit both, read both from the same place.
vault set --stdin. Never argv, never
stdout, never a screenshot.purgeShots() runs at the end of every run.decodeJwtClaims() output, never the token.~/.local/share/web-forge/profile-azure) holds a live tenant-admin session — treat
it as credential-equivalent.~/work/example-client — the 2026-08-02 migration of a client's Speech + Language resources from a
personal Microsoft account into the client's own tenant, under a CA block. Decision record: that
repo's docs/security-and-compliance/README.md.
What SKILL.md sets; muted values are Claude Code's defaults
4 skills in this plugin
/admin-consoleDrive console-only Google Workspace Admin settings (admin.google.com) that no API or GAM can reach, through a signed-in Chrome profile chosen by admin email — recipes as data, idempotent ensure, read-back verification after Save, JSON result, a screenshot per step. Recipes gmail-default-routing (Gmail › Default routing rules: match a group, single address, pattern or everyone; change the envelope recipient, add X-Gm-Original-To), gmail-routing (Gmail › Routing per org unit, including OUTBOUND mail: redirect mail for one outside address, by description) and passwordless. Handles the "verify it's you" re-authentication gate without ever typing a password. TRIGGERS - admin console, admin.google.com, Google Admin setting with no API, Gmail default routing, Gmail routing, outbound routing rule, envelope filter, routing rule, change envelope recipient, X-Gm-Original-To, GAM cannot, Cloud Identity Policy API missing setting, verify it's you admin./cf-access-wallPut any set of hostnames — including bare *.workers.dev Workers, no custom domain needed — behind a Cloudflare Access login wall (GitHub SSO and/or emailed one-time PIN for non-technical users) from a declarative JSON spec, idempotently. Handles the Zero Trust org, identity providers, per-app sessions, email allow-lists, and service tokens for CLI/CI clients. Use when capability URLs / unguessable slugs are no longer enough and a team needs real identity on private mini-sites. Triggers: "protect this site with login", "GitHub login on the site", "email code login", "Cloudflare Access", "put the workers behind auth", "secure the mini-site".
/web-forge:azure-provisionfrom web-forge
npx claudepluginhub terrylica/cc-skills --plugin web-forgeOther plugins' skills for the same job