Applied AI-Accelerated Government Development

Land It on Azure Government

Updated

Intermediate

What you'll learn

~60 min
  • Register the app in Microsoft Entra ID (Microsoft's cloud identity service) in the Government cloud, and point lesson 03's sign-in code at its issuer (the URL that names who signs your ID tokens)
  • Connect to the database with a managed identity (an identity Azure issues to your app, so no password exists) through the platform seam's token kind (the seam is the one interface core code uses to ask for identity, database credential, secrets and telemetry)
  • Read secrets from Key Vault (Azure's secret store) behind platform.secrets.get, and know when a Key Vault reference (an app setting that Azure fills from the vault) fits instead
  • Separate what runs on your laptop (type check, unit tests) from what needs your subscription (sign-in, database grant, vault read, telemetry arrival), and write the runbook for the second group
ℹRead one of three

Lessons 34, 35 and 36 land the same seam on three clouds; read the one your agency uses, then lesson 37 for your code host. On a different cloud? AWS GovCloud (35) · Google Cloud Assured Workloads (36).

One file lands the whole seam

Lessons 03, 05, 08 and 16 built the reference app against the platform seam and ran it on a laptop with the local implementation. This lesson writes the second implementation: src/platform/azure/index.ts, the file that makes the same app run on Azure Government with no database password and no secret in the repository.

Before the detail — Artifact: one file, src/platform/azure/index.ts, selected by PLATFORM=azure, plus a verification runbook. Acceptance test: the reference type-checks and its unit tests pass on your laptop, and four checks that need your subscription (sign-in, database grant, vault read, telemetry arrival) each have a command and an expected result you have run or have marked NOT RUN. Status of what follows: reusable guidance. The Azure choices are one landing of the seam, and none of it is a federal requirement.

What the file lands, and where each piece plugs in:

Seam memberWhat the Azure file suppliesCore code that uses it
identityEntra ID issuer, client id, the roles claimsrc/lib/auth/oidc.ts (lesson 03)
db.authA token credential, kind tokensrc/lib/db/connection.ts and withPool (lesson 08)
secrets.getKey Vault readsThe client secret for sign-in (lesson 03)
telemetry.startThe Microsoft OpenTelemetry Distro, in processstartTelemetry (lesson 16), reached through registerTelemetry
HostApp Service for Containers, an image in Azure Container Registry, PLATFORM=azureThe deploy steps (lesson 18)

The model adapter for Azure OpenAI is not in this file. It sits behind its own interface in lesson 26, the model call behind your API.

ℹStatus checked 2026-11-05

Availability, authorization, agency approval, region support, and price are five separate facts. This box holds the dated service facts for this lesson; the prose does not state any of them. Everything here is read from Microsoft’s documentation, not run against a live Azure Government subscription.

Sign-in. Entra ID has a separate authority per cloud: Government is https://login.microsoftonline.us, the portal is https://portal.azure.us, and Microsoft says to “register your application separately in each Azure portal”. Source: https://learn.microsoft.com/en-us/entra/identity-platform/authentication-national-cloud. Microsoft states that Azure Active Directory B2C is “not available” in Azure Government (https://learn.microsoft.com/en-us/azure/azure-government/compare-azure-government-global-azure), so plan for the workforce tenant, not B2C. Entra emits a roles claim “for each role that the user or service principal was granted”: https://learn.microsoft.com/en-us/entra/identity-platform/howto-add-app-roles-in-apps. UNVERIFIED: the Government host for Microsoft Graph, and how group overage behaves (not used here; the app reads app roles).

Database. Managed identity to Azure SQL works, with a database user created from the identity: https://learn.microsoft.com/en-us/azure/azure-sql/database/authentication-azure-ad-user-assigned-managed-identity. For a Managed Instance, the instance identity must be enabled for Entra authentication, and its Graph permissions must be granted by a Privileged Role Administrator. Government database host suffix: database.usgovcloudapi.net. UNVERIFIED: the Managed Instance host pattern, and the token scope string for Government (the driver reads the scope from the server; see the baseline, which is source-derived and was not run against Government SQL).

Key Vault. Host suffix vault.usgovcloudapi.net. App Service Key Vault references use the app’s system-assigned identity by default (a user-assigned one can be named), need the Key Vault Secrets User role (role-based access control) or the Get secrets permission (access policy), and a rotated secret reaches the app within 24 hours: https://learn.microsoft.com/en-us/azure/app-service/app-service-key-vault-references.

Telemetry. Microsoft’s current guidance for a new Node app is the Microsoft OpenTelemetry Distro (@microsoft/opentelemetry): https://learn.microsoft.com/en-us/azure/azure-monitor/app/opentelemetry-enable. For Government the connection string carries the endpoint suffix, and the ingestion host is {region}.in.applicationinsights.azure.us. UNVERIFIED: that the new distro needs no extra Government setting beyond the Government connection string; no Government note was found on the distro page. UNVERIFIED: the distro’s handling of a credential and of an AADAudience value against a Government resource.

Host. Container Registry suffix azurecr.us, App Service suffix azurewebsites.us. Microsoft lists limits for App Service in Government, including that App Service Certificate, Managed Certificate and Domain are unavailable and that the only deployment options are Local Git Repository and External Repository: https://learn.microsoft.com/en-us/azure/azure-government/compare-azure-government-global-azure.

Recheck the cited source and your agency’s authorization boundary before you rely on any of it.


Sign-in: Entra ID in the Government cloud

Lesson 03’s oidc.ts is vendor-neutral: it takes an identity from the seam and runs authorization code with PKCE (a one-time proof that the party finishing sign-in started it), state and nonce. Landing it on Azure means two things: an app registration in the Government portal, and the identity block that describes it.

Plan the change with your agent

In gov-dev-reference-app, src/platform/azure/index.ts already ships so npm run typecheck runs out of the box (either audit the existing implementation against the checklist below, or run git rm src/platform/azure/index.ts on a practice branch to watch the agent build it from scratch). Once the app registration exists, open your agent in the project root and switch to Plan mode (Shift+Tab, /plan, or the mode picker). Ask it to read the platform seam types and plan the Azure implementation:

Read src/platform/types.ts and src/platform/local/index.ts without editing, and plan src/platform/azure/index.ts for identity, passwordless database auth, Key Vault secrets, and telemetry using Government endpoints only. Ask me anything unclear first.

What to check in the plan before you approve

  • identity points at the Government authority (https://login.microsoftonline.us/${need('ENTRA_TENANT_ID')}/v2.0), reads ENTRA_CLIENT_ID, names 'entra-client-secret' for the vault lookup, and extracts string entries from claims.roles.
  • One credential object (ManagedIdentityCredential in production, DefaultAzureCredential with AzureAuthorityHosts.AzureGovernment locally) is shared across db.auth (kind: 'token', with no hardcoded token scope), SecretClient (https://<KEY_VAULT_NAME>.vault.usgovcloudapi.net), and @microsoft/opentelemetry.
  • Missing required environment variables fail immediately at startup with a message naming the variable.

If the first plan hardcodes a commercial sign-in host or a database token scope string, correct it before approving:

Use login.microsoftonline.us and vault.usgovcloudapi.net, and omit any database token scope string so the SQL driver reads the scope from the server.
SESSION Land the seam on Azure Government
  1. Typed in the terminal: claude
  2. Mode:Plan mode
  3. You type in the session: Read src/platform/types.ts and src/platform/local/index.ts without editing, and plan src/platform/azure/index.ts for identity, passwordless database auth, Key Vault secrets, and telemetry using Government endpoints only. Ask me anything unclear first.
  4. The tool replies: Plan (read-only, nothing edited): 1. identity: issuer https://login.microsoftonline.us/<ENTRA_TENANT_ID>/v2.0; clientId from ENTRA_CLIENT_ID; clientSecretName 'entra-client-secret'; rolesFrom reads the roles claim and keeps strings only. 2. db: target from AZURE_SQL_SERVER and AZURE_SQL_DATABASE; auth kind 'token' with one credential. No scope string: the driver reads it from the server. 3. credential: ManagedIdentityCredential when NODE_ENV is production (clientId only if AZURE_CLIENT_ID is set); otherwise DefaultAzureCredential with AzureAuthorityHosts.AzureGovernment. 4. secrets: SecretClient on https://<KEY_VAULT_NAME>.vault.usgovcloudapi.net with the same credential. 5. telemetry: dynamic import of @microsoft/opentelemetry, connection string from APPLICATIONINSIGHTS_CONNECTION_STRING. Open questions I cannot answer from the repository: the exact Government setting for the distro, and whether your Managed Instance has Entra authentication enabled. I will mark both as unverified in the file's comments.
  5. Mode:Plan approved: plan mode off
  6. You type in the session: Approved. Implement it. Fail at startup if any required setting is missing, and name the setting.
  7. The tool replies: Created src/platform/azure/index.ts. - A small need(name) helper throws '<NAME> is not set' for each required setting, so a missing ENTRA_TENANT_ID stops the process at startup instead of failing on the first request. - The platform is registered in src/platform/index.ts under the key 'azure' and loaded lazily, so PLATFORM=local never reads these settings. - I kept one credential object and passed it to the database auth, the vault client and the telemetry exporter.
  8. You type in the session: Run the type check.
  9. The tool replies: $ cd gov-dev-reference-app && npx tsc --noEmit $ echo $? 0 The file satisfies the Platform interface: db.auth is the 'token' kind, secrets.get returns Promise<string>, telemetry.start returns Promise<void>. This proves names and types. It does not prove a login, a grant, a vault read or a trace; those need your subscription.
  10. You type in the session: Local dev works, but the first request in staging says the database login failed for the app's identity. Diagnose without changing code.
  11. The tool replies: On your laptop the credential is your own az login identity, which is already a database user. In staging the credential is the web app's managed identity, which has no database user yet. Same code, different principal. Check, in order: 1. The identity is on: az webapp identity show -g <rg> -n <app>. 2. The database has a user for it: SELECT name FROM sys.database_principals WHERE type IN ('E','X'). 3. If not, an Entra admin runs CREATE USER [<app-name>] FROM EXTERNAL PROVIDER in the application database, then adds the roles. No code change: the app is behaving correctly.

Illustrative session in Claude Code; the exact wording varies.

What you do in the portal, before any code:

  1. Open portal.azure.us, not the commercial portal. A registration made in the other cloud’s portal does not exist here.
  2. Register an application in your Government tenant. Add a redirect URI that matches the one your login route passes to startLogin.
  3. Create a client secret and store it in Key Vault under the name entra-client-secret (the name the file uses; the next sections cover the vault).
  4. Define app roles on the registration, one per role your agency uses, and assign them to users or groups on the matching enterprise application. App roles are small, application-specific and do not grow with directory membership, so they travel better than groups.

The reference identity block in src/platform/azure/index.ts from gov-dev-reference-app (compare with what your agent writes; you do not type it by hand):

// src/platform/azure/index.ts (excerpt)
export const azurePlatform: Platform = {
name: 'azure',
identity: {
issuer: `https://login.microsoftonline.us/${need('ENTRA_TENANT_ID')}/v2.0`,
clientId: need('ENTRA_CLIENT_ID'),
clientSecretName: 'entra-client-secret',
scopes: ['openid', 'profile'],
// Entra app roles arrive in the `roles` claim, as the values defined on the app registration.
rolesFrom: (claims) => (Array.isArray(claims.roles) ? claims.roles.filter((r): r is string => typeof r === 'string') : []),
},

Three things to read in it. The issuer is the tenant on the Government host with /v2.0, which is the string oidc.ts hands to discovery and the library then checks on every token. clientSecretName is a name, never a value: oidc.ts receives the secret from platform.secrets.get. rolesFrom returns raw role names; lesson 05 maps them to the closed role set, and a token with no roles claim yields an empty list, which maps to no permissions.

The vendor’s own library, MSAL, is the alternative to oidc.ts. It points at the same authority (https://login.microsoftonline.us/<tenant>), and the seam does not change, because only the sign-in file reads identity. The reference uses the standards library so the same file serves all three clouds. You decide which your agency has already approved.


A database with no password

Lesson 08 split the credential into two kinds: secret (a user and password from a store) and token (a short-lived token from a credential object). On Azure the token kind applies: the app’s managed identity gets a token, and Azure SQL checks it against a database user created from that identity (reference excerpt from gov-dev-reference-app):

// src/platform/azure/index.ts (excerpt)
import { DefaultAzureCredential, ManagedIdentityCredential, AzureAuthorityHosts } from '@azure/identity';
// ...
// App Service: the managed identity (AZURE_CLIENT_ID only for a user-assigned one).
// A laptop: your own Azure CLI sign-in, pointed at the Government sign-in host.
const credential = process.env.NODE_ENV === 'production'
? new ManagedIdentityCredential(process.env.AZURE_CLIENT_ID ? { clientId: process.env.AZURE_CLIENT_ID } : {})
: new DefaultAzureCredential({ authorityHost: AzureAuthorityHosts.AzureGovernment });
// ...
db: {
target: { server: need('AZURE_SQL_SERVER'), database: need('AZURE_SQL_DATABASE') },
// The driver asks Azure SQL for the token scope; no scope string here.
auth: { kind: 'token', credential },
},

Two environment names sound alike and are not the same thing. ENTRA_CLIENT_ID is the sign-in app registration. AZURE_CLIENT_ID is read by the credential, and only when the app uses a user-assigned managed identity; leave it unset for a system-assigned one.

The core code in gov-dev-reference-app that consumes auth is lesson 08’s, unchanged:

// src/lib/db/connection.ts (excerpt)
if (auth.kind === 'token') {
return { ...base, authentication: { type: 'token-credential', options: { credential: auth.credential } } } as sql.config;
}

The driver takes the token scope from the server’s login response, so no scope string appears anywhere in your code. That is deliberate: a scope pasted from a commercial-cloud example is a guess in the one place a wrong guess gives a confusing login failure.

The database grant. The identity must exist as a database user, created once by an administrator with the Entra admin role on the server. Run it in the application database, not in master:

CREATE USER [your-app-name] FROM EXTERNAL PROVIDER;
ALTER ROLE db_datareader ADD MEMBER [your-app-name];
ALTER ROLE db_datawriter ADD MEMBER [your-app-name];

The name is the web app’s name for a system-assigned identity, or the identity resource’s name for a user-assigned one. Grant the roles your app needs and no more; lesson 24’s schema contract is the place to say which tables it writes.

Local development. On a laptop the file builds DefaultAzureCredential with AzureAuthorityHosts.AzureGovernment, so your own az login signs you in at the Government host. Point the CLI at the right cloud first:

Terminal window
az cloud set --name AzureUSGovernment
az login
⚠The azure-active-directory-default pitfall

The driver’s azure-active-directory-default authentication type builds its default credential without the Government host, so it can sign in to the commercial cloud and still look fine on a laptop that happens to carry other settings. The seam avoids it by building the credential itself and passing it as kind token, which the connection code turns into token-credential. If generated code reaches for the other type, send it back; the alternative is to set the AZURE_AUTHORITY_HOST environment variable.

Most days you will not run PLATFORM=azure on a laptop at all. The local implementation exists so lessons 03 to 16 run without a subscription. Use PLATFORM=azure locally only when you are debugging the Azure landing itself, against resources you own.


Secrets: Key Vault behind platform.secrets.get

The seam gives the app one call for secrets. In the reference implementation from gov-dev-reference-app, it reads Key Vault on the Government host with the same credential as the database:

// src/platform/azure/index.ts (excerpt)
const vault = new SecretClient(`https://${need('KEY_VAULT_NAME')}.vault.usgovcloudapi.net`, credential);
// ...
secrets: {
get: async (name) => {
const s = await vault.getSecret(name);
if (s.value === undefined) throw new Error(`secret ${name} has no value`);
return s.value;
},
},

The managed identity needs read access to secrets on the vault: the Key Vault Secrets User role if the vault uses role-based access control, or the Get permission under an access policy. A missing grant surfaces as a failed read, not as an empty value, and the code above turns a vault entry without a value into an error as well.

There are two ways a secret reaches the app, and you should choose one per secret:

RouteHow it worksChoose it when
platform.secrets.get(name)The app reads the vault at runtime with its identityThe app reads the value in code, such as the sign-in client secret
Key Vault referenceAn app setting whose value is @Microsoft.KeyVault(SecretUri=https://<vault>.vault.usgovcloudapi.net/secrets/<name>); App Service fills itThe app reads an environment variable and you want no vault code on that path

A reference is refreshed on Azure’s schedule (the status box gives the interval), while a runtime read is current when it runs. An unresolved reference shows up as the literal reference text in the variable, so test for that at startup.


Telemetry: the distro in process

Lesson 16’s startup hook calls registerTelemetry(serviceName), which calls platform.telemetry.start. In the reference implementation from gov-dev-reference-app, that is the Microsoft OpenTelemetry Distro (a package that wires the OpenTelemetry SDK to Azure Monitor), started inside the app process:

// src/platform/azure/index.ts (excerpt)
start: async (serviceName) => {
process.env.OTEL_SERVICE_NAME ??= serviceName; // the distro reads the standard variable
const { useMicrosoftOpenTelemetry } = await import('@microsoft/opentelemetry');
useMicrosoftOpenTelemetry({
azureMonitor: { azureMonitorExporterOptions: { connectionString: need('APPLICATIONINSIGHTS_CONNECTION_STRING'), credential } },
});
},

The connection string comes from the Application Insights resource in the Government portal; copy it whole, because it carries its own ingestion endpoint. Never build the ingestion host by hand. The credential field is meant to let the managed identity authenticate the telemetry instead of the connection string’s key alone; with the older Azure Monitor distro that also meant granting the identity the Monitoring Metrics Publisher role on the resource. How the new distro handles credential in Azure Government is not verified here (see the status box), so treat the role grant as a step to confirm against your resource, not a known requirement.

Two things this file does not prove, and the status box says so: the new distro was not found to need any extra Government setting beyond the Government connection string, and that is not the same as verified; and a credential against a Government resource has not been run here. Treat “spans arrive” as a check you perform. The reference hands the service name over through OTEL_SERVICE_NAME, the standard variable OpenTelemetry’s resource detection reads; that the distro honors it was not run here either, so look at the name your spans carry in the portal before a dashboard filter depends on it.


The host: App Service for Containers

The app runs as one container image. Azure Container Registry (ACR, a private image store) holds it, and App Service for Containers (Azure’s managed host for an image) runs it with the managed identity the whole file relies on. Lesson 18 has the image and deploy steps; the Azure-specific settings are these:

App settingValue
PLATFORMazure (any other value fails at startup; mainframe fails with PLATFORM must be one of: local, azure, aws, google)
NODE_ENVproduction, which selects the managed identity credential
ENTRA_TENANT_ID, ENTRA_CLIENT_IDThe sign-in app registration
KEY_VAULT_NAMEThe vault’s name, without the host
AZURE_SQL_SERVER, AZURE_SQL_DATABASECopy the server name from your Government portal, never from an AI answer
APPLICATIONINSIGHTS_CONNECTION_STRINGThe full string from the Government portal
AZURE_CLIENT_IDOnly for a user-assigned managed identity

Assign the identity, give it the registry pull role, and point the host at the image:

Terminal window
az cloud set --name AzureUSGovernment
az login
PRINCIPAL_ID=$(az webapp identity assign -g "$RESOURCE_GROUP" -n "$APP_NAME" --query principalId -o tsv)
ACR_ID=$(az acr show -g "$RESOURCE_GROUP" -n "$ACR_NAME" --query id -o tsv)
az role assignment create --assignee "$PRINCIPAL_ID" --scope "$ACR_ID" --role "AcrPull"
az webapp config set -g "$RESOURCE_GROUP" -n "$APP_NAME" \
--generic-configurations '{"acrUseManagedIdentityCreds": true}'

Without az cloud set, every call goes to the commercial cloud and reports a resource that does not exist.

Lesson 19’s deploy stage calls scripts/deploy/<PLATFORM>.sh with one argument: the digest-qualified image reference, registry/repo@sha256:.... For this platform that file points the host at the digest, restarts it, and refuses to report success until the health URL from lesson 18 answers:

REFERENCE CODE scripts/deploy/azure.sh: deploy container image by digest and poll health check open reference hide reference Reference implementation from gov-dev-reference-app; open to inspect or compare with what your agent builds.
#!/usr/bin/env bash
# scripts/deploy/azure.sh <registry/repo@sha256:...>
set -euo pipefail
IMAGE="${1:?usage: azure.sh <registry/repo@sha256:digest>}"
LOGIN_SERVER="${IMAGE%%/*}"
: "${RESOURCE_GROUP:?}" "${APP_NAME:?}"
TIMEOUT="${HEALTH_TIMEOUT_SECONDS:-300}"
az webapp config container set \
-g "$RESOURCE_GROUP" -n "$APP_NAME" \
--container-image-name "$IMAGE" \
--container-registry-url "https://$LOGIN_SERVER"
az webapp restart -g "$RESOURCE_GROUP" -n "$APP_NAME"
URL="https://$APP_NAME.azurewebsites.us/api/health"
deadline=$((SECONDS + TIMEOUT))
until curl -fsS -o /dev/null "$URL"; do
if (( SECONDS >= deadline )); then
echo "deploy: $URL did not return 200 within ${TIMEOUT}s" >&2
exit 1
fi
sleep 5
done
echo "deploy: $IMAGE is serving at $URL"

The script reads the registry host from the reference it is given, so it never types a hostname, and the health route it polls does not touch the database (lesson 18), so a slow database cannot fail the deploy. curl -f turns any non-200 answer into a retry, and the timeout turns a container that never starts into a non-zero exit that stops the pipeline. It has not been run against a subscription; see the check in “Prove it”.

Kubernetes (AKS) is the exception, not the starting point: this module is PaaS first, and an orchestrator earns its place only when no managed container host can run the workload.


Prove it

Two groups of checks. Run the first on your laptop now; the second needs your subscription, so each line carries a status you fill in.

Runs locally. From the repository root of the reference:

Terminal window
cd gov-dev-reference-app
npx tsc --noEmit
npx vitest run tests/unit/connection.test.ts

npx tsc --noEmit type-checks the Azure file against the seam’s interface. npx vitest run tests/unit/connection.test.ts runs the connection provider’s unit tests (12 passed on the reference), which cover both kinds of credential. Neither starts an Azure client.

Needs your subscription (NOT RUN here). None of these has been run against a live Azure Government subscription for this lesson. The runbook, with the expected result:

CheckCommand or actionExpectedStatus
Sign-inSet PLATFORM=azure and the settings above, open /auth/login, sign in as a user with an app roleThe session holds sub, an issuer starting https://login.microsoftonline.us/, a name, and the role names you assignedNOT RUN
Database grantIn the app, run one read through withPool; in the database, run SELECT name, type_desc FROM sys.database_principals WHERE name = N'<app-name>'The read returns rows; the principal is listed with an external typeNOT RUN
Key Vault readaz keyvault secret show --vault-name <vault> --name entra-client-secret --query id -o tsv, then restart the app and sign inThe command prints the secret’s id (not its value); sign-in still worksNOT RUN
Telemetry arrivalMake three requests, then open Transaction search on the Application Insights resource in portal.azure.usSpans from your app appear within a few minutes, under the name you expectNOT RUN
Deploy scriptExport RESOURCE_GROUP and APP_NAME, run scripts/deploy/azure.sh "$REGISTRY/platform-app@sha256:<digest>" with a digest already in the registry; then rerun it with APP_NAME pointing at a stopped app and HEALTH_TIMEOUT_SECONDS=30The first run prints the serving line and exits 0; the second exits non-zero after the timeoutNOT RUN

The negative cases belong in the runbook too. Remove the database user and expect a login failure, not a hang. Remove the vault grant and expect a failed read with the secret’s name in the error. Set PLATFORM=mainframe and expect the startup error from the table above; the reference’s environment tests already prove that last one against the local stack.


KNOWLEDGE CHECK

Sign-in completes in your Government tenant, the session has a name, and every user has an empty role list. What do you check first?

KNOWLEDGE CHECK

The app works on your laptop and fails in staging with a database login error for the web app's identity. The code is identical. Why, and what is the fix?


Practice status

PracticeStatusAlso called
Managed identity token to the database, no stored passwordstrong optionalpasswordless database access, workload identity
App roles in the roles claim, mapped to a closed role set in the appcommon baselinerole claims, app-defined roles
Secrets in a vault, read at runtime or injected by referencecommon baselinesecret manager, vault reference
Telemetry exported through the cloud’s OpenTelemetry distro or an OTLP collectorcommon baselineAPM export, vendor distro
Local development signed in as yourself, never a shared credentialstrong optionaldeveloper identity, ambient credentials
One implementation file selected by a startup variable that fails on unknown valuesreference-shopplatform adapter, fail-closed configuration
Managed container host first, Kubernetes by exceptionstrong optionalPaaS first

Scale: required | common baseline | strong optional | reference-shop (seen only at organizations that publish their own practice) | emerging

Key takeaway

  • Azure Government is one implementation of the seam. Core code did not change; one file supplies identity, a token credential, a vault client and a telemetry start.
  • No database password exists on this landing, so the work moves to a one-time database grant and an app-role assignment, each of which fails loudly when missing.
  • The type check and unit tests prove the file’s shape. Sign-in, the grant, the vault read and telemetry arrival need your subscription and stay NOT RUN until you run them.
LEADERSHIP DECISION
Whether your agency accepts a managed-identity database login on this cloud, and who holds the Entra admin role that creates the database user.
PRACTITIONER ACTION
Register the app in the Government portal, grant the identity its database user and vault access, then run the four runbook checks and record each result.
SUCCESS MEASURE
Calendar time: all four checks pass on a fresh environment in one working day, with no password written anywhere.

Legend: LEADERSHIP DECISION = what a leader decides · PRACTITIONER ACTION = what the engineer does next · SUCCESS MEASURE = how you know, in calendar time, assessor-hours or cost, contract or revenue risk, or audit finding avoided

Search lessons