AZ-401: A Governed Release Failure Scenario
Reason through a failed release by separating five decisions: what candidate reached which target, whether the operation was authorized, which identity performed it, what the workload evidence shows, and whether recovery is compatible with the current state. Preserve the failure and stop further exposure while resolving those questions. An approved stage, successful deployment task or valid federated identity answers only part of the release decision.
This architecture synthesis applies those boundaries to one hypothetical, pre-existing nonproduction Azure Pipelines release to App Service. It includes a vault secret as an existing application dependency, then works through diagnosis, recovery acceptance and owned cleanup. No pipeline was run, fault introduced, secret retrieved, configuration changed or recovery executed for this article.
Define the existing scenario and its limits
Assume the team already has an Azure Pipelines pipeline written in YAML (YAML Ain't Markup Language), a versioned application package and an Azure App Service app with a supported staging slot. The entire app is nonproduction. Its baseline application remains available, and the owner has approved a bounded candidate-slot evaluation before promotion.
The environment also already contains:
- A federated Azure Resource Manager service connection individually authorized for the selected pipeline.
- Resource-owner approvals and checks on the resources the release actually consumes.
- An application runtime identity and its existing approved access arrangement for one Azure Key Vault vault secret.
- Working application instrumentation, relevant Azure Monitor data and authorized analysts.
- The previous application artifact, configuration record and an owner-reviewed compatibility and recovery plan.
These are prerequisites, not installations performed by the case. App Service slots require an eligible Standard, Premium or Isolated plan and permission for the intended operation. A slot is a live application, so its access and capacity remain material even when the app is nonproduction.
The scenario input is this assumed failure: after the selected package is staged, a controlled application operation fails before promotion. The deployment task appears successful, but sanitized application evidence points toward a downstream access problem. That description is a hypothesis supplied for reasoning, not a measured result or proof of the cause.
Do not reproduce it by revoking shared access or breaking a real dependency. No production traffic, new tenant, database migration or vault retrieval connector is part of this exercise.
Bring the prerequisite decisions into one release record
The architecture combines existing decisions rather than rebuilding each mechanism.
| Established subject | Evidence needed in this case |
|---|---|
| Tests Published Results and Enforced Quality Gates | Actual selected-revision execution, report completeness and the intended quality decision |
| Protected Deployment Environments and Approvals | The consumed resource, applicable checks, real reviewer and any bypass |
| Progressive Delivery and Deployment Slot Decisions | Eligible slot, controlled exposure, meaningful health evidence and compatibility |
| Azure Pipelines Workload Identity and Service Connections | Actual connection, trusted assertion, represented Azure principal and resource scope |
| Secrets Keys Certificates and Sensitive Deployment Assets | The vault secret's consumer, granted actions and permitted diagnostic disclosure |
| Infrastructure Metrics Application Telemetry and Distributed Traces | Working collection, relevant resource/application identity, scope and time window |
Keep a restricted evidence ledger containing the pipeline revision and run, selected artifact identity, target app and slot, starting configuration, approval state, principals, relevant observations and owner decisions. These are recommended review fields, not a new pipeline schema.
A run artifact and an Azure Artifacts feed package have different storage boundaries. Record the actual selected package and its originating run or other approved provenance. A label such as latest or a successful earlier build cannot establish which bytes reached this target.
Require the current tests and their publication evidence to refer to that candidate. A report that published successfully does not prove that the intended suite executed, and a complete test result does not approve a deployment resource.
Check admission before interpreting deployment behavior
Trace the actual stage to the protected resources it consumes. Azure resource owners configure approvals and checks outside the pipeline definition; a condition authored in YAML does not replace them.
Inspect the real branch, run, designated reviewer and applicable check results. If a check is pending, rejected or expired, preserve that admission outcome. A deployment task that never started supplies no evidence of a failed token exchange or an unhealthy application.
Also inspect privileged exceptions. An administrator may have a documented bypass path for supported checks, but a bypass is a distinct event requiring its own authority and evidence. Calling the change a hotfix does not supply that authority. This case does not disable or bypass the existing controls.
If the stage consumed a different resource from the one whose checks were reviewed, stop: a familiar environment name is insufficient. Resolve the binding with the pipeline and resource owners before claiming the release was governed.
For the assumed staged failure, admission has permitted only the scoped nonproduction work. It has not certified the candidate's health or authorized promotion after that failure.
Separate the deployment and runtime identities
The deployment principal is the Azure identity represented by the selected service connection. Workload identity federation avoids a stored connection secret, but pipeline authorization, successful authentication and Azure resource authorization remain separate observations.
Use the existing connection's actual trust values and sanitized task diagnostics. Do not reconstruct its issuer or subject from display names. Applicable new Azure public-cloud connections use the Microsoft Entra issuer; the legacy Azure DevOps issuer retires on July 1, 2027 for the documented single-tenant application and managed-identity scope. Multitenant applications and non-public clouds are excluded. An existing connection must be assessed from its actual configuration, not a copied legacy pattern.
The application's runtime identity is another boundary. It may be a system-assigned identity tied to a resource's lifecycle or a separately managed user-assigned identity. Neither choice automatically grants access to a downstream secret.
The vault owner grants the consumer its permitted actions. The existing asset here is a secret in a vault; the separate Managed HSM (hardware security module) service is key-focused and is not substituted for that vault. The case configures no secret-retrieval integration.
Use this separation when interpreting the failure:
| Observation | What still needs verification |
|---|---|
| Pipeline can use the service connection | The represented Azure principal and its permitted target operation |
| Deployment authentication succeeds | Actual resource authorization and deployment result |
| Package reaches the intended slot | Which runtime identity the application actually uses |
| Runtime identity authenticates | Permission for the intended secret operation and other dependency conditions |
| One consumer accesses the secret | Whether it is the failing candidate's actual consumer in the same context |
Granting the deployment principal broad vault access is not a demonstrated repair for a runtime consumer denial. Likewise, a resource owner testing successfully under their personal identity cannot prove the application's access.
Stop promotion and establish the exact current state
In this scenario, the candidate failed before promotion. Keep the baseline serving its existing nonproduction scope and stop further exposure through the release's established controls. Do not swap merely because the task appears green.
Before changing anything, establish:
- Which run, pipeline revision and artifact were used.
- Which app and slot received the deployment, and which application version is actually running.
- Whether a swap, traffic change or configuration change occurred.
- Which settings are slot-specific and which identity is attached to each relevant slot.
- Whether the controlled operation changed data or caused an external side effect.
- Which observations support each answer and which remain unavailable.
The Web App task must match the actual package, platform, connection and slot contract. This case reuses that existing implementation rather than supplying another deployment recipe. A container variant would have its own requirements: its task documentation explicitly warns that an incorrect image need not produce a task error. That warning reinforces why workload identity and health require direct evidence; it does not turn this package case into a second container lab.
App Service swaps move selected content and settings, while other settings remain associated with their slots. Managed identities and virtual network integration do not swap; app settings and connection strings can be slot-specific. Do not assume a cloned or previously working slot has equivalent connectivity, consumer identity or secret access.
If actual records show promotion already occurred, revise the incident's current-state record and treat containment and recovery under the owners' existing plan. Do not continue using this case's pre-promotion assumption as evidence about that different state.
Test the failure hypothesis against relevant evidence
Begin with the controlled operation, affected slot and investigation interval. Inspect existing application failure and transaction evidence, then relate it to the actual dependency and resource context. Compare the candidate with the baseline only where their inputs, permissions and workload conditions are meaningfully comparable.
Application Insights requires supported instrumentation and successful ingestion. Log Analytics analysis depends on populated tables, actual schema and selected resource or workspace scope. A blank view can mean missing collection, a wrong scope, an unsuitable window or lack of activity; it is not proof of health.
Use the following reasoning branches without manufacturing observations:
| Candidate explanation | Evidence that would discriminate it | Decision boundary |
|---|---|---|
| Wrong artifact or target | Actual deployed version, package selection, app and slot identity | Correct the release selection through its owner before interpreting unrelated telemetry. |
| Federation or deployment-role problem | Real task diagnostics, existing trust correspondence and target permission | Stop at the unresolved authentication or resource-authorization layer. |
| Runtime consumer lacks required secret access | Actual runtime principal, intended vault operation and applicable granted permissions | Ask the vault and application owners to assess the exact consumer boundary. |
| Configuration or connectivity differs | Current slot settings, dependency selection and relevant error evidence | Repair only the supported, identified difference through its owner. |
| Telemetry is incomplete or mis-scoped | Instrumentation, ingestion, actual data source, resource and interval | Keep diagnosis inconclusive until the required evidence is available. |
An access-related error supports investigation of that path; it does not prove every surrounding condition. A coincident resource spike is also a lead, not a causal guarantee. Preserve contrary observations and compare the proposed cause with alternative explanations.
If the consumer grant is the confirmed issue, the responsible owner should decide whether the intended runtime operation is legitimate and whether a narrowly scoped correction is appropriate. Do not replace diagnosis with broad access or weaken a shared policy. An absent permission can be an intentional denial.
Keep secret values and raw tokens out of diagnostic evidence. GitHub Actions secure-use guidance explicitly warns that redaction is not guaranteed in that platform. The general precaution applied here is to minimize sensitive output, rather than asserting that Azure Pipelines has identical masking behavior. If exposure is discovered, involve the security and secret owners for containment and rotation; deleting a log alone does not invalidate a disclosed credential.
Choose repair, hold or recovery from compatibility evidence
A release stop limits further exposure. It does not itself restore the candidate slot, undo data writes or resolve the underlying defect.
For this assumed pre-promotion failure, the owner has three bounded choices:
- Hold the candidate unchanged while gathering the missing evidence.
- Approve a specific repair, then repeat the relevant validation for the actual repaired candidate.
- Restore the candidate slot to the retained, compatible application and configuration through the existing governed release path.
Before the last choice, confirm that the previous artifact remains available and that its code and configuration can safely use the current data and dependencies. This case introduces no database migration, but application operations can still leave state or external effects. Their owners must assess compatibility rather than assuming that unchanged schema means unchanged state.
A slot swap or redeployment is therefore not a universal data rollback. If compatibility is unknown, stop for the application and data owners' decision. Do not introduce an improvised database restore or secret-version change as though it followed automatically from reverting code.
Use AZ-401: Ordered Deployments Hotfixes and Workload Recovery for the related implementation and ordering work. Any recovery still requires its own authorized identity, applicable approvals and current target selection. Approval of the original candidate is not blanket authority for every corrective operation.
Define acceptance and owned cleanup before closing
The following are observable criteria for a future authorized exercise, not results achieved here.
| Decision | Evidence required before recording it |
|---|---|
| Failure preserved and exposure contained | Original candidate/run/error retained, promotion state established and further exposure stopped |
| Diagnosis supported | Relevant principal, configuration, dependency and telemetry evidence discriminate the chosen explanation |
| Repair accepted | Exact repaired candidate assessed with the required tests, reports and controlled workload behavior |
| Recovery accepted | Intended compatible artifact/configuration restored, current state assessed and meaningful workload checks satisfied |
| Authority preserved | Actual resource approvals, pipeline grants and owner decisions remain traceable |
| Closure ready | Sensitive-data handling, remaining risks, retained evidence and cleanup ownership recorded |
Use meaningful health and usage observations over the owner-approved interval. A platform warm-up response or absence of reported errors cannot replace the application's agreed acceptance behavior. Do not turn an invented universal threshold or short waiting period into a safety guarantee.
Preserve the failed run, needed logs, test evidence and selected recovery artifact through their actual retention owners. Azure Pipelines run deletion can remove logs, pipeline/build artifacts and test data; run retention does not govern every feed package, image or deployed resource. Verify availability instead of relying solely on an old successful run's name.
Finally, compare the retained end state with the recorded starting state. Restore only the temporary candidate, configuration, test routing or permission changes that the respective owners authorized. Preserve shared identities, the pre-existing vault secret, normal consumer grants, instrumentation and release protections. If an owner chooses to retain a correction, record that choice rather than calling it a restoration.
An inspection-only reasoning exercise creates nothing to remove. Its useful deliverable is the evidence ledger, failure analysis, explicit unresolved decisions and acceptance/cleanup plan—not a claimed successful deployment or a newly built tenant.
Authoritative Sources
- Architecture strategies for safe deployment practices — Governed exposure, workload health and recovery reasoning.
- Set up staging environments in Azure App Service — Eligible plans, slot permissions, swap and configuration boundaries.
- Define approvals and checks — Consumed-resource admission and distinct administrative bypass.
- Key Azure Pipelines concepts — Stages, runs, jobs, selected artifacts and YAML versus Classic concepts.
- Connect to Azure with an Azure Resource Manager service connection — Federation, individual pipeline authorization and the qualified issuer transition.
- Managed identities for Azure resources — System-assigned/user-assigned lifecycle and downstream authorization.
- Azure Key Vault basic concepts — Vault secrets, consumer permissions and the separate Managed HSM scope.
- Azure Monitor overview — Telemetry collection, analysis and distinct workspace types.
- Introduction to Application Insights - OpenTelemetry observability — Supported instrumentation, ingestion and workload investigation.
- Tutorial: Use Log Analytics — Populated data, actual schema and resource/workspace analysis scope.
- Secure use reference — GitHub Actions sensitive-output and untrusted-execution guidance; general precautions are distinguished in the case.
- Retention policies — Run-related evidence deletion and separate package retention.
- AzureWebApp@1 - Azure Web App v1 task — Existing package/platform/connection/slot implementation conditions.
- AzureWebAppContainer@1 - Azure Web App for Containers v1 task — Separate container variant and incorrect-image warning; no container lab is performed.
Related Reading
- Prerequisite: AZ-401: Tests Published Results and Enforced Quality Gates
- Prerequisite: AZ-401: Protected Deployment Environments and Approvals
- Prerequisite: AZ-401: Progressive Delivery and Deployment Slot Decisions
- Prerequisite: AZ-401: Azure Pipelines Workload Identity and Service Connections
- Prerequisite: AZ-401: Secrets Keys Certificates and Sensitive Deployment Assets
- Prerequisite: AZ-401: Infrastructure Metrics Application Telemetry and Distributed Traces
- AZ-401: Ordered Deployments Hotfixes and Workload Recovery

