Troubleshooting
Accounts, tools and repo setup
Section titled “Accounts, tools and repo setup”az loginsigns you in to the wrong tenant or subscription: sign in again withaz login --tenant '<tenant-id>' --use-device-code, list your subscriptions withaz account list --output table, then runaz account set --subscription '<subscription-id>'. Find the tenant ID in the Azure portal under Microsoft Entra ID > Overview. Then runInitialize-Workstation.ps1(or./scripts/Initialize-Settings.ps1) again.git commitsays “Author identity unknown”: git has no author configured. RunInitialize-Workstation.ps1onvm-dev01, or setgit config --global user.name "<your name>"andgit config --global user.email "<your email>", then commit again.git pushfails when pushing.github/workflows/platform.yml(refusing to allow an OAuth App to create or update workflow): your GitHub CLI token lacks theworkflowscope. Rungh auth refresh --hostname github.com --scopes repo,workflowonvm-dev01(or re-runInitialize-Workstation.ps1), then push again.git clonereturns 404 (or repository not found) when using a pre-created cohort repo: you have not accepted the GitHub collaborator invitation yet. Sign in to GitHub with the exact username you gave your team lead and accept the email invitation or openhttps://github.com/<org>/<repo>/invitationsbefore cloning.- Collaborator invitation fails or student pushes to
mainare rejected in a lead-provisioned cohort: check the partner organization’s outside-collaborator policy (if outside collaborators are disabled, add students as organization members or let students create their own private repo viaInitialize-Workstation.ps1) and confirm no organization or repository ruleset onmainblocks direct commits. nodeorazdis not recognized on a pre-existingvm-dev01: your VM was provisioned beforenode24 LTS andazdwere added toInstall-DevTools.ps1. RunInitialize-Workstation.ps1in PowerShell 7 (pwsh) onvm-dev01to install both machine-wide and refresh yourPATH.Import-Kit.ps1fails to download or extract: the error says it could not download the archive fromapi.github.com, or thattarfailed. Check outbound HTTPS toapi.github.com,codeload.github.comand*.githubusercontent.com(see the network allow-list). Re-runInitialize-Workstation.ps1(orpwsh ./Import-Kit.ps1 -Force). An HTTP 403 means GitHub’s per-IP limit for unauthenticated calls: wait a while or switch network.Initialize-Settings.ps1saved the wrong subscription: run./scripts/Initialize-Settings.ps1 -SubscriptionId '<subscription-id>' -TenantId '<tenant-id>'again fromfactory/. It updates only the values you pass.factory/.local/is missing onvm-dev01: that git-ignored folder holds yoursettings.json(includingsuffix) anddatacenter.json. Re-runInitialize-Workstation.ps1onvm-dev01(it auto-detects any existingrg-university-<suffix>in your subscription so your suffix never drifts, or pass-Suffix '<old suffix>').
Preflight
Section titled “Preflight”- Preflight reports FAIL on Owner: you have no unconditional Owner assignment on your workload subscription. Contributor doesn’t pass. If Owner is eligible through Privileged Identity Management, activate it first; otherwise ask your team lead to escalate to the event owner.
- Preflight fails on a resource provider: the
whatifstage registers missing providers for you. Wait up to 15 minutes for the registration to propagate, then run the stage again. - Preflight warns on the public IP feature, or a deployment stops with
SubscriptionNotRegisteredForFeature:Microsoft.Network/AllowBringYourOwnPublicIpAddressstaysPendingon standard partner subscriptions and is safe to ignore there; preflight logs aWARNand still returnsGO. On subscriptions that enforce the feature for public IP creation, thewhatifstage registers it and thenMicrosoft.Networkagain. If a deployment later stops withSubscriptionNotRegisteredForFeature, wait a few minutes and run the stage again, or ask the subscription administrator.
Datacenter and Arc
Section titled “Datacenter and Arc”- The
memberstage stops or fails on quota or a VM size: read the run log, then run the stage again; it converges. If a quota or size error comes back, check Usage + quotas for your event’s region (swedencentralunless told otherwise) in the Azure portal and tell your team lead; they can escalate to the event owner. - The
memberstage fails indev-01-toolslooking up the PowerShell installer: PowerShell 7.7 removed MSI installers from its GitHub release. Currentmaininstalls from thewin-x64.ziparchive instead, and any workflow withKIT_REF: mainpicks up the fix automatically on a rerun. If your.github/workflows/platform.ymlpins an older commit SHA inKIT_REF, re-import the kit (Import-Kit.ps1 -Force) or setKIT_REF: main, push tomain, and rerunstage=member. - The datacenter test fails on in-VM checks: both VMs must run, and the test precedes Arc. If onboarding never started, fix the failure and rerun. If onboarding already disabled the guest agent, do not rerun
member: the test cannot use run commands anymore. Preserve the earlier PASS evidence and use the Arc recovery path. - Bastion won’t connect: connect from the Azure portal:
rg-datacenter> the VM > Connect > Bastion, userlabadmin. Check the VM is running. The native client (Connect-DatacenterVm.ps1) is an optional shortcut that works only from Windows with the Azure CLI Bastion extension. - Copilot isn’t signed in on
vm-dev01: the VS Code extensions install at first logon, so give the first sign-in up to five minutes, then sign in to GitHub in VS Code. - Arc onboarding times out: do not rerun
member. It refuses an existing Arc machine; if onboarding stopped earlier but disabled the guest agent, a rerun instead fails at the test. ReadC:\LabTools\logs\Connect-AppArc.logthrough Bastion and check outbound Arc access through NAT. IfGet-PipelineEvidence.ps1has no successful run to download, use the standard lab credentials reference or get custom credentials privately from the team lead. Before C5, use the approved rebuild below; after C5, ask for a coach repair.
ALZ-lite and vending
Section titled “ALZ-lite and vending”- Vending can’t find the hub: confirm the
foundationstage finished and the expected hub resource names exist (vnet-hub,afw-hub,afwp-hub,rg-hub) before you run thevendingstage. - Vending reports a missing principal or stale reader roster verification: correct
memberPrincipalIdin the lead’s private.local/roster.json, sync the reader group from the full roster, then rerun the affected batch. A membership change alone doesn’t require re-vending unless the affected member also needs direct vending grants or spoke repairs. - DNS stops resolving after vending: stopped VMs may need restarting or
ipconfig /renew. A rebuilt datacenter needs the team lead to rerun vending for that member before restarting. Never redeploy an Arc-connected datacenter. Grant-SqlMiDirectoryRead.ps1stops withInteractionRequiredorTokenCreatedWithOutdatedPolicies: the role holder’s Microsoft Graph sign-in is stale. They runaz logout, thenaz loginagain as themselves, and repeat.- No datacenter exemptions appear: normally correct:
rg-datacentercomplies with ALZ-lite and needs none. Bastion’s standalone public IP is outside the NIC policy’s scope. Record compliance and “none needed”, plus the C2 deferred-work entry; do not rerun vending just to get exemptions. Investigate actual non-compliance with the team lead rather than ignoring it or bypassing tenant policy.
If Arc onboarding needs recovery
Section titled “If Arc onboarding needs recovery”After Arc onboarding starts, before C5: the stage refuses an Arc machine; a partially disabled guest agent can instead break the test. With the event owner’s approval, tear down your member scope first, wait for teardown to finish green in Actions, and then re-run member:
- Team member (
2..n, in your own repo): rungh workflow run platform.yml -f stage=teardown, wait for it to finish green, then rungh workflow run platform.yml -f stage=member. - Team lead (for your own slot
1or a single member<index>from the lead repo): rungh workflow run platform.yml -f stage=teardown -f members=<index>, wait for it to finish green, then rungh workflow run platform.yml -f stage=member -f members=<index>.
Member teardown removes rg-datacenter, rg-spoke and the archetype, including the SQL Managed Instance. Repeat Step 3 and the vm-dev01 setup. If the member does not hold eligible Windows Server licenses, add -f no-hybrid-benefit=true to the member command. If the member was already vended, the team lead must run vending for that index afterward. Before T+2, never run a full, unfiltered team teardown in the team lead’s repo; pass -f members=<your index> or ask your team lead to escalate to the event owner for a coach repair. After C5, do not use this recovery; ask the event owner for a coach repair.
Pipeline
Section titled “Pipeline”gh workflow runsays the workflow wasn’t found (HTTP 404): GitHub dispatches a workflow only from the default branch. Merge the import tomainfirst, or run the stage from the Actions tab.- A run fails at once, with no steps and no log: open the job’s annotation. Private-repo Actions runs use the plan’s included compute first; additional usage is billed to the repository owner. Ask the partner GitHub owner to check Billing & Licensing, the budget and payment method, then run the stage again.
- Step 1.5 cannot create
gh-labor set its environment secrets: check the partner organization’s GitHub plan and your repo permissions before T-14. The owner reported a private-repo pipeline test on GitHub Free, but current GitHub environment documentation says private-repo environments require Pro for personal accounts or Team for organizations, and private-repo required reviewers are Enterprise-only. Verify the setup in your own organization; if required reviewers are unavailable, write access is the gate. See the Requirements note and issue #203. - A run waits and nothing happens: it’s waiting for the reviewer. Open the run and choose Review deployments. On a private repo with no reviewer option there’s no gate, so a run that sits queued has lost its runner: cancel it and run the stage again.
- Login fails with
AADSTS700213: the identity’s credential doesn’t match what your repo presents. Run./scripts/Test-PipelineSetup.ps1(add-Profile Memberin your own repo): it names the failing check. Re-runningInitialize-PlatformPipeline.ps1repairs the credential. - The guard refuses a subscription: it isn’t on the pipeline’s approved list or is on its deny list. Check the roster and the repo’s environment secrets with
Test-PipelineSetup.ps1. Never add a subscription to the approved list to get past this unless it’s part of the event. vm-app01 is already an Arc machine: the member stage never redeploys over Arc. Use the recovery above before C5; after C5, ask the event owner for a coach repair.Vending stopped at member N ... hub is incomplete: run thefoundationstage first. Vending needsvnet-hub,afw-hub,log-managementandid-sqlmi-directory.- The ALZ-lite what-if prints “First deployment”: expected. The what-if can’t compare against management groups that don’t exist yet. Run the
foundationstage. - Removal stops before the team step: a member’s removal failed. Fix it, run
teardownagain, and the finished members are skipped. It also stops if a subscription under the Corp group isn’t in the roster. - Preflight or another script fails with “Azure CLI returned an invalid JSON response”: older kit copies could mix Azure CLI warnings into the JSON response. Re-import the kit (
Import-Kit.ps1 -Force, commit and merge it) to get the fix. If a Python warning is causing the error,$env:PYTHONWARNINGS = 'ignore'in that terminal is a temporary workaround. - Arc shows
vm-app01Connected but no SQL Server instance appears: the Azure extension for SQL Server (WindowsAgent.SqlServer) didn’t install itself, which happens in some subscriptions (seen with every Defender for Cloud plan on). Thememberstage installs it after 5 minutes. On an older copy, install it in the portal: Azure Arc > Machines >vm-app01> Extensions > Add, choose the Azure extension for SQL Server and the LicenseOnly license type (Developer edition is free). The instances appear in a few minutes. Remove-PlatformPipeline.ps1says it could not check the GitHub environment:ghwas refused, so the script can’t tell whether it is gone. Sign in withgh auth loginas an admin of the repo and run it again.- A subscription ID shows in a public run log: delete that run (
gh run delete <id>), then check that the value is stored as an environment secret and not a variable.
Modernizing the app
Section titled “Modernizing the app”- The app falls back to a default connection after task 01: task 01 resets the project’s
UserSecretsId. Re-enter your local user secrets afterward. - Blob or Service Bus calls return 403 on the dev VM:
AZURE_TOKEN_CREDENTIALS=AzureCliCredentialisn’t set in that terminal, or VS Code was opened before it was set at the user level. Set it once, then restart every terminal and VS Code. - Production configuration refuses to start without Key Vault: by design. The app refuses a connection string with a user name or password outside
Development, and requiresKeyVault:VaultUrioutsideDevelopmenttoo.
APEX and the archetype
Section titled “APEX and the archetype”- A Windows checkout changes the archetype’s tree hash (
main.bicepparamhas CRLF line endings):Import-Kit.ps1adds*.bicepparam text eol=lfto.gitattributes. If an older clone has CRLF line endings ininfra/bicep/university/main.bicepparam, re-runInitialize-Workstation.ps1(orImport-Kit.ps1 -Force) and normalize line endings withgit add --renormalize infra/bicep/university. - Preflight stops with
snet-sqlmi already hosts another managed instance: the suffix you ran it with isn’t the suffix of the managed instance already in your subnet. Preflight accepts onlysqlmi-university-<suffix>there, so a different suffix looks like someone else’s instance. This can happen if you recreate your local settings and get a new suffix. Find the suffix you deployed with, from any resource name such asrg-university-<suffix>, set it again (./scripts/Initialize-Settings.ps1 -Suffix '<old suffix>'fromfactory/, andazd env set SUFFIX <old suffix>ininfra/bicep/university/), and re-run. Never delete the managed instance to get past it. If the suffix is right and the message stays, a different instance really is on your subnet: stop and ask your team lead, who can escalate to the event owner. azd provision --previewlooks incomplete: the preview only lists resource typesazdhas display names for. SQL MI, the managed identity, role assignments and diagnostic settings are still being created even though the preview doesn’t name them.- Preflight says a SQL virtual cluster still holds
snet-sqlmi: a deleted MI’s cluster can retain the subnet for hours. Wait for Azure to release it, then retry with the same suffix; do not delete the VNet, change suffix or remove the service association to force it. - Governance discovery reports
PARTIALon Tenant Root policies, or provisioning fails withRequestDisallowedByPolicyfor MFA: the foundation reader group grants members Reader atmg-factoryand its descendants, not at Tenant Root, so custom definitions or assignments at Tenant Root can reportPARTIALduring/apex-adapt-archetype. Policies that check onlyrequestContext().identity(such as Multi Factor Authentication Enforcement - Write and - Delete) test your sign-in token rather than Bicep properties:/apex-adapt-archetypecontinues past them, and you satisfy them by signing in with MFA for bothaz loginandazd auth login. - Preflight cannot read or assign
id-sqlmi-directory: the member lacks Reader on the shared subscription or Managed Identity Operator on the identity. The team lead checks the roster’s member principal and reruns vending for that index; a user sign-in alone cannot grant the missing role.
Migration
Section titled “Migration”CREATE USER ... FROM EXTERNAL PROVIDERfails before cutover: the replica is read-only until cutover completes. This is expected, not a bug, and the command only succeeds afterward.CREATE USERfails after cutover with a directory-read error: have the team lead run Step 2.2’sGrant-SqlMiDirectoryRead.ps1 -WhatIf. All three Graph permissions must already be granted to the MI’s primary identity; missing grants need the Privileged Role Administrator, not an app password or SQL-authentication workaround.- An aborted MI link leaves a writable copy of the database behind: delete it before reseeding, or the next seed attempt fails.
- A planned failover run from the managed instance side fails: cut over from the Arc portal’s pane, not with a CLI command issued from the MI. See the Azure Arc and the MI link guide.
Acceptance and cleanup
Section titled “Acceptance and cleanup”- The acceptance checker reports UNKNOWN: it could not decide a read/scope check. Keep its actual
NOT ACCEPTEDverdict, collect the portal evidence described in C8, resolve the cause with a coach and rerun. A screenshot cannot turn UNKNOWN into a passing script run. teardowntimes out waiting for an MI subnet association: Azure has not released the deleted MI’s subnet yet. Wait and rerun the same memberteardown. Do not force-delete the VNet or remove the service association; team cleanup must wait for successful member cleanup.
Where to go next
Section titled “Where to go next”Before day one, ask your team lead; they can escalate to the event owner. On event days, ask a coach if the documented recovery steps don’t resolve your problem. Otherwise go back to Requirements, Member steps or the challenges overview.