Skip to documentation
Open Workflow Studio
On this page

Azure workflow deployments

The Webfrontend app provides Workflow Studio > Package > Deploy to Azure and a Deployments page immediately below Automations in navigation. The server publishes the exported Aspire application model, converts its Bicep infrastructure to ARM JSON, builds a production container with Azure Container Registry Tasks, and deploys the application to Azure Container Apps.

The standalone WASM PWA retains its source-package exports. Azure deployment orchestration runs on Webfrontend because it requires server-side SDK tools and a background deployment worker.

Deployment architecture

Deploy to Azure workflow settings, orchestration, identities, runtime and recovery

Open Flowchart > Deploy to Azure in either app mode for the zoomable architecture view, or open the rendered SVG.

Surface Settings and capabilities
Workflow Studio and Package Applied graph, typed endpoint/credential bindings, dashboard style, theme/accent, governance and Agent 365 package options.
Vault and Settings Explicit deployment service principal, protected credentials, optional sign-in registration, secret names and resource references.
Deploy to Azure dialog Typed Parameters, subscription, new/existing resource group, region, existing/new Key Vault, authorized operators or explicit anonymous access, appearance, validation and billable-resource consent.
Server pipeline Single-use ten-minute validation, isolated Aspire/Bicep publishing, infrastructure ARM deployment, real ACR Tasks image build, and application ARM rollout.
Runtime HTTPS Container Apps endpoint, managed identity, Key Vault references, appearance and optional add-ons, provider endpoints, and optional workflow-owned Azure resources.
Deployments and recovery Protected IndexedDB tracking, observed ARM/ACR events, filters, event export, cancellation, application links, and explicit Portal inspection after server-job loss.

The deployment service principal performs management operations. The deployed application's managed identity pulls the image and reads Key Vault references. Model and sandbox permissions remain operator-managed. Appearance, parameters, scope, access-mode or credential changes invalidate prior validation.

Include interactive workflow player is unchecked by default under Application appearance. Enable it to add a live workflow pane and an optional modal view to either dashboard style, with per-step execution states, estimated costs, and movable media/output popups. Changing this option rebuilds the deployment package and invalidates prior validation. Source-package exports expose the same option for Aspire applications.

Browser synthetic-data/vector caches and deployment history use separate IndexedDB databases. Exported cached product-search workflows use their host's local file cache. Container-local files are ephemeral; configure a writable persistent mount and Workflow:DataDirectory, or supply a shared IWorkflowDataStore, for durable reuse across Container Apps replacements. See Container Apps storage mounts.

Prepare Azure access

In Settings > Service Principals, add the tenant ID, application ID, secret, and optional description of an explicitly authorized deployment identity, then click Save service principals. Settings and Vault share the same encrypted credential store. Deployment uses the selected saved identity to discover subscriptions, resource groups, regions, and Key Vaults, and for every Azure management operation. Host managed identities, developer CLI sessions, and environment credentials are excluded.

You can also create and import an identity directly from the deployment dialog. Under the deployment identity's role guidance, expand Azure Entra ID Service Principal setup commands, which starts collapsed. Replace <subscription-id> in the copyable PowerShell / Azure CLI script, open its Azure Cloud Shell link, and run it using an account authorized to create Entra applications and assign Azure roles. Review the proposed subscription-wide Contributor and Role Based Access Control Administrator grants, then type CREATE. The script uses az ad sp create-for-rbac and prints its credential JSON, including the one-time client secret. It preserves that JSON if the subsequent access-administration grant fails, so you can save the identity and finish its permissions using the scope-specific setup commands below.

Paste only the JSON object into Azure CLI service principal JSON, then click Add Service Principal to Vault. This explicitly saves the identity in the shared protected Vault, refreshes the Service principal dropdown, selects the saved application ID, and immediately lists its subscriptions using the same flow as manual selection. An existing application ID updates that saved identity. The pasted JSON stays in memory and is cleared after a successful save or when the dialog is disposed. Invalid JSON and storage failures retain the input for correction or retry. A subscription-lookup failure leaves the saved identity selected and reports the Azure error; allow role propagation and select it again to retry.

The deployment identity needs Contributor on the selected subscription for this subscription-scoped ARM deployment and ACR Tasks. It also needs Role Based Access Control Administrator on the existing target resource group and any external Key Vault or sandbox resources where the template assigns roles. Creating a new resource group requires role-assignment administration at subscription scope. References in another subscription additionally require Contributor on their resource groups for nested ARM deployments. Apply organization-approved restrictions and narrow broad grants after provisioning. The object ID used for role assignments comes from the acquired Azure management token; directory-wide Microsoft Graph access is unnecessary.

Register the required resource providers and verify regional service availability, subscription quota, and Azure policy before deploying. The package uses Microsoft.App, Microsoft.ContainerRegistry, Microsoft.ManagedIdentity, Microsoft.KeyVault, and Microsoft.Authorization resources. Workflows with Azure resource widgets additionally use Microsoft.Storage and Microsoft.EventGrid.

Workflow-owned media resources

The Azure toolbox's Blob Storage, Storage Queue, and Event Grid steps declare resources through stable deployment bindings. Steps sharing a binding share the deployed resource. During Preview, an explicitly selected service principal enumerates existing subscriptions, accounts, containers, queues, and topics through ARM. Preview runs access those existing resources with scoped data-plane permissions.

Deploy to Azure creates a separate StorageV2 account, private blob containers, queues, and custom Event Grid topics in the confirmed deployment scope. infra/azure-resources.bicep grants the application identity container-scoped Storage Blob Data Contributor, queue-scoped Storage Queue Data Contributor, and topic-scoped EventGrid Data Sender. Storage account keys and Event Grid local-key authentication are disabled.

The Web application revision initializes AzureResources__<BINDING>__Endpoint and AzureResources__<BINDING>__ResourceName from the newly provisioned resources. Preview endpoints, resource contents, and discovery principal secrets are excluded from this runtime initialization. Upload any required input briefs to the new containers explicitly. The source package's azure-resources.json lists the exact bindings.

The infrastructure stage returns WORKFLOW_AZURE_RESOURCE_BINDINGS as a JSON string containing the actual deployed names and service endpoints. Both the server deployment worker and the generated azd parameter file pass that value to the Web revision. The worker verifies every declared binding and its service-specific endpoint before deploying the application; missing or malformed outputs fail explicitly.

The 15 Cloud (Azure) Video Samples use these resources for private generated-media archives, durable producer review tickets, and human-approved lifecycle events. Event Grid subscriptions and queue consumers require separate integration. New resources can incur charges, role assignments can take time to propagate, and partially completed media jobs retain already written artifacts for inspection. Use unique media job IDs and deduplicate downstream deliveries. See the Azure resource step for operation limits and configuration.

Choose the application's access mode. A nonempty authorized operator list requires a single-tenant Entra sign-in application in the deployment identity's tenant. You can reuse the selected deployment service principal after configuring its Web sign-in settings; a separate registration limits exposure of privileged deployment credentials. An empty operator list explicitly enables anonymous access and requires no sign-in application or sign-in secret.

Choose an existing RBAC-enabled Key Vault containing the required workflow secrets, or create and seed a new vault in the selected deployment and resource group. Existing vaults use secret-name references. New vaults collect workflow secret values plus the sign-in secret when authentication is enabled, and pass them through a secure ARM object parameter during provisioning.

Stop an active lab before deploying. Temporary lab credentials remain scoped to lab activity.

Understand the three identities

Identity Purpose and required access
Deployment service principal Creates resources, runs the image build, and assigns the template's roles. Uses the Contributor and access-administration scopes described above.
Entra sign-in application A single-tenant Web app registration, optionally shared with the deployment principal. No Azure RBAC role is required for sign-in. When authentication is enabled, the package requests openid and profile, validates the tenant/audience, and authorizes the individual operator object IDs. Configure its client secret and both Web redirect URIs. Custom Entra app roles and Microsoft Graph application permissions are unnecessary for this sign-in flow. Anonymous deployments skip this identity role.
Deployed app's managed identity Reads vault secrets and pulls its image with automatically assigned Key Vault Secrets User and AcrPull roles. Packaged sandbox groups receive scoped data-owner access. Entra model calls need Cognitive Services User on Foundry or Cognitive Services OpenAI User on Azure OpenAI, assigned separately.

The sign-in field accepts an Application (client) ID. Azure RBAC grants target the deployment service principal's Object ID in Entra Enterprise applications. Runtime model grants target the generated managed identity's Principal ID. App-registration ownership and Azure resource-role administration are separate permissions.

The dialog's Azure roles and setup commands disclosure starts collapsed. It provides copyable PowerShell/Azure CLI scripts and an Azure Cloud Shell link, following the Foundry Auth Policy command pattern. An authorized administrator runs these scripts manually. They validate IDs/scopes, display proposed grants, require APPLY, preserve existing assignments, and surface CLI errors. The model-access script selects the role from the resource's AIServices or OpenAI kind.

Entra sign-in application ID uses the Vault service-principal popup, with each app ID above its optional description. Manual entry remains available. Selecting a matching saved app, including the deployment principal, fills its secret when creating a new vault. Tenant mismatches are rejected for authenticated deployments. Secret values remain excluded from copied setup commands.

Choose the destination

  1. Apply pending workflow step settings and open Package > Deploy to Azure.
  2. Complete Parameters above Azure account and destination. The scrollable list shows at most five rows, with defaults for workflow endpoints, API-key and credential bindings, and general Web/appsettings.json settings. Required secrets have named ENTER_..._HERE placeholders and thick, light red borders. Replace every highlighted placeholder with a valid value before validating or deploying. A Foundry API key can be empty to use Managed Identity; external endpoints require a key. Shared keys remain required whenever any binding uses an external endpoint. Entered secret values are masked once the placeholder is replaced.
  3. Select a saved service principal, or create and import one through Azure Entra ID Service Principal setup commands. Its enabled subscriptions are listed using that identity.
  4. Select a subscription and an existing resource group, or choose Create a new resource group and enter its name and metadata region.
  5. Choose the deployment region. The default uses the resource group's region. The region dropdown lists subscription locations, and Enter another region provides a textbox for new or internal region names.
  6. In Application sign-in and secrets, leave Authorized operator object IDs empty for anonymous access, or enter operator IDs and supply the Entra application ID and sign-in secret name. Select Use an existing Key Vault, then click its Resource ID textbox to open the popup of Key Vaults in the selected subscription. Choose an entry or type an external vault's Resource ID manually. Refresh available Key Vaults uses the same deployment principal. Alternatively, select Create a new Key Vault in this deployment and enter a globally unique name. Map each workflow credential binding to a secret name; application-setting secrets have generated names. Both vault modes create or update those names with the values supplied in Parameters. A new vault also requires the sign-in client secret when authentication is enabled.
  7. Click Validate deployment. Review the destination, confirm the authorization for billable resources and scoped role assignments, then click Deploy to Azure.

The resource group's metadata location can differ from the region hosting the registry, managed identity, Container Apps environment, and application. Existing resource group tags are preserved, including updates observed between validation and execution. A new-group request fails safely if that name becomes occupied before deployment.

The deployment inherits the currently selected Aspire dashboard, theme, governance, and Agent 365 package options. The Application appearance section lets you change Dashboard style, Theme, and Theme accent directly in the deployment dialog. New workflows default to Simple, listed before Pro, with Punchy blue and the Light accent. Appearance changes rebuild the deployment package and require validation again while preserving parameter edits and add-on choices. These changes remain local to the deployment dialog; ordinary Package folder and ZIP exports keep their selected options.

Parameter edits remain in the dialog's memory and invalidate the previous validation. Settings retain their JSON types; enter JSON booleans, numbers, arrays, and objects where those defaults are shown. Both the dialog and server reject remaining placeholders and empty required secret values, and reevaluate API-key requirements using the current endpoint values. Empty Foundry keys select Managed Identity in the deployment-only workflow configuration, including the Entra token scope and Bearer authentication. Their unused Key Vault references and secret writes are omitted. The generated user-assigned app identity still needs the provider's model-access role. Validation checks the resolved workflow endpoints. Before Aspire publishing and container-source packaging, the worker writes nonsecret endpoint and application-setting values to Web/appsettings.json on a deployment-only package copy and clears secret settings from that copy. The same endpoint values are supplied through the ARM workflowEnvironment parameter. Supplied credentials and application-setting secrets use Container Apps Key Vault references, keeping their actual values out of the image. The source workflow and ordinary exports remain unchanged.

The Key Vault popup shows the subscription's discovered Resource IDs and vault names, including when the textbox already contains a value. Typing filters those suggestions. Use the arrow keys and Enter to select, or Escape to close the popup while keeping the deployment dialog open. Manual entries can reference another resource group or subscription; validation still checks the vault's tenant, RBAC mode, and deployment permissions. Discovery and selection leave saved Vault Resource IDs unchanged.

Anonymous application access

An empty operator list disables Container Apps Authentication and sets the deployed application's Auth:Enabled configuration to false. Sign-in fields and sign-in secret references are omitted. Redeploying with an empty list explicitly disables any existing platform sign-in configuration, so a previous authenticated deployment cannot retain its login requirement.

Anyone with the application URL can run workflows and access their executions. Anonymous visitors share the application's public execution history and can control available runs. Provider requests can incur charges. The dialog displays this warning and includes the access mode in the confirmation review, deployment history, and completion guidance.

A nonempty list retains both platform Entra authentication and the application's tenant, audience, operator, and token-expiration checks. Invalid operator IDs still fail validation. Removing sign-in leaves workflow credential mappings, Key Vault protection, managed identities, HTTPS, and model/sandbox permissions in place. Generated applications remain protected by default unless Auth:Enabled=false is explicitly configured.

New Key Vaults and secret handling

New vaults are created in the selected subscription and resource group, using the deployment region. They use the Standard SKU, Azure RBAC, 90-day soft delete, and purge protection. The application identity receives vault-scoped Key Vault Secrets User access. Creating the vault and secrets uses ARM control-plane permissions; the deployment identity does not receive an additional secret-reader role.

Azure name availability and resource existence are checked during validation and immediately before provisioning. Reserved and soft-deleted names require a different name. Purge protection keeps deleted vaults recoverable and their names reserved through the retention period.

The enabled new-vault sign-in secret and parameter secrets are written through secure ARM parameters during infrastructure provisioning. Existing vaults receive the supplied parameter secrets in their own resource group without changing the vault's configuration. Named values create new secret versions, so review the mappings and overwrite authorization before confirming. Values remain in memory and a secureObject parameter, and are excluded from normal request serialization, saved history, event exports, logs, and container source. Changing a secret value invalidates the previous validation. Switching back to an existing vault clears the new-vault sign-in secret and preserves the parameter inputs. Secret names shared by workflow bindings must use identical values.

Validation and execution

Validation checks destination syntax, workflow configuration, the selected identity, the existing Key Vault's tenant and RBAC mode or new-vault name availability, server SDK availability, Bicep compilation, and Azure ARM infrastructure validation. Validation creates no Azure resources. Changing settings or rotating the saved deployment secret requires validation again. Each validation is single-use and expires after ten minutes.

Azure management JSON requests are buffered before transmission and sent with an explicit Content-Length. This prevents RequestWithoutBody rejections caused by chunked HTTP/1.1 bodies during validation, Key Vault name checks, deployment, registry operations, and cancellation.

The dialog confirms infrastructure readiness. Secret contents, Entra redirect URI registration, model authorization, sandbox access, regional capacity, and application runtime readiness still require operator verification. The final application deployment can report Azure policy, quota, network, or Key Vault errors.

When validation fails, the dialog displays Azure's detailed error response below the summary. Nested error codes, messages, resource targets, policy details, and returned request/correlation IDs are retained. The selected deployment principal's secret, seeded Key Vault values, access tokens, signed URLs, and sensitive request fields are redacted. Oversized diagnostics are explicitly marked as truncated.

Use the icon-only Copy Azure deployment error button in the error panel to copy the displayed summary and redacted details together, including the returned tracking IDs. Clipboard failures are reported in the panel.

InvalidTemplateDeployment is an outer validation error. Read its nested details to identify the actual rejection, such as a denied policy, unavailable regional SKU, unregistered provider, invalid template parameter, or missing permission. Correct the reported condition and validate again. Validation failures also appear in the subscription's Activity log; they can be absent from deployment history because no deployment started. See Find Azure deployment error codes.

For a reported Microsoft.Authorization/roleAssignments/write authorization failure, validation identifies the missing action, the deployment principal's Enterprise application Object ID, and a recommended grant scope. Keep its Contributor access and have an authorized administrator grant Role Based Access Control Administrator at the existing target resource group, or at the subscription when creating a new group. Existing external Key Vault and sandbox resources also need access-control grants at their own scopes. The guarded commands under Azure roles and setup commands perform this administrator setup. Allow RBAC propagation, then validate again. Conditional role grants and deny assignments must permit the template's actual role assignments; ARM remains the authoritative permission check. The application never elevates its own permissions or skips role validation.

After confirmation, the app saves a tracking record in IndexedDB before admitting the server job. The browser navigates to /deployments?id=<deployment-id>. The navigation guard resolves relative destinations against the application's base URI, including apps hosted under a subpath. The confirmed handoff bypasses pending-step discard confirmation once for the application's Deployments page; other destinations retain the normal confirmation. The worker then:

  1. Builds the exported AppHost in Release and publishes the Aspire manifest. It verifies the manifest contains the expected Web project.
  2. Deploys the compiled ARM infrastructure in incremental mode, including the selected resource group, managed identity, registry, Container Apps environment, and scoped access.
  3. Uploads a bounded source archive and uses ACR Tasks to build and push the production Linux image. The Web Dockerfile includes required media tooling. A local Docker daemon is unnecessary.
  4. Deploys the real image with Key Vault-backed credential references, managed identity, health probes, HTTPS, and the confirmed authenticated or anonymous access mode.

AppHost and the Aspire developer dashboard stay on the build host. Authentication-field credentials and local launch settings are excluded from the uploaded container source.

The shared Aspire infrastructure template leaves appLogsConfiguration unset for environments created without a saved-log destination. Live log streaming remains available, and no Log Analytics workspace is provisioned. Configure persisted logging later through the environment's logging options when needed.

The server runs one deployment at a time and queues up to eight additional jobs. Builds have a twelve-minute per-tool deadline, ACR builds have a thirty-minute deadline, and the complete server job has a one-hour deadline. Queue and retained-job limits are explicit. Repeated start acknowledgments use the same job, and a consumed validation cannot create another deployment.

Follow deployment events

Deployments uses the Labs page's header and browser-local library pattern. Search by workflow, environment, or resource group; filter active, successful, or attention-needed deployments; and select historical entries beside the current deployment.

The details view shows observed stages, UTC timestamps, elapsed time, destination metadata, ARM operation events, and ACR build states. Active and canceling stages use the playground's rotating progress icon. Completed, failed, canceled, incomplete, pending, and unstarted stages have distinct status icons and text. It reports actual stage transitions without predicting percentage completion. Follow latest events controls event-log scrolling. Event search narrows the visible log. The most recent 400 events are retained, with an explicit truncation notice when needed.

ARM operation lists also include deployment-level bookkeeping, such as output evaluation, with an omitted or null resource target. Tracking skips these non-resource records while preserving resource events and the deployment's authoritative state. A successful infrastructure deployment proceeds to the image build.

Infrastructure and application output names use ordinal case-insensitive matching. Azure can return the declared uppercase names with camel casing, such as azurE_RESOURCE_GROUP, servicE_WEB_URI, and workfloW_KEY_VAULT_URI. Required output values must still be nonempty strings, and the resource group output must match the confirmed destination. Missing or invalid required outputs produce an error naming the output to inspect in Azure Portal; created resources are retained.

Transient Azure tracking failures receive up to five retries per read before the deployment reports failure. Dropped connections, response-read failures, request timeouts, and HTTP 408, 429, 500, 502, 503, and 504 responses use exponential delays of 2, 4, 8, 16, and 30 seconds. A longer Azure Retry-After delay is honored. Retry and recovery messages appear in the event log while the deployment keeps its current stage. Successful reads reset the retry budget. Cancellation interrupts backoff immediately, and the overall deployment deadline still applies.

These retries continue the existing ARM deployment or ACR build tracking. Resource creation, build scheduling, uploads, validation submissions, and cancellation requests remain single-use. Authorization failures, malformed responses, and Azure-reported terminal failures retain their immediate error handling. Browser disconnections leave the server job running independently; reopening the page resumes tracking while that job remains available.

Azure deployment operations opens the resource group's deployment history. Completed applications expose Open application. Authenticated applications also show the two Web redirect URIs to register in the selected Entra application:

https://<application-host>/signin-oidc
https://<application-host>/.auth/login/aad/callback

Anonymous deployments show their public-access warning in place of redirect URI setup. Verify any configured operator IDs, current workflow Key Vault secrets, network policies, model permissions, and sandbox permissions before using the workflow.

Cancel deployment stops further server work and requests cancellation of the current ARM deployment or ACR build. Azure cancellation can be asynchronous. Failed or unconfirmed cancellation is shown in the event log. Previously created resources and completed images remain in Azure and can incur charges. Inspect Azure Portal and remove unwanted resources explicitly.

Export events downloads the selected status and event snapshot as JSON. It excludes deployment credentials and tracking capabilities. Remove from history removes a terminal record from this browser and leaves Azure resources unchanged.

Storage and recovery

Deployment history has a dedicated deployments object store in the BenchiusDeployments IndexedDB database. Monotonic revisions prevent older tabs from overwriting newer snapshots. Each job requires a random tracking capability, encrypted with the server's Data Protection key ring and bound to its deployment ID. The capability is kept out of event exports and navigation URLs.

Service principal secrets, access tokens, raw command output, source upload signatures, and authentication-field credentials stay out of deployment history. Build processes use isolated home/configuration/package directories and an explicit package feed. Temporary workspaces are removed after the operation.

Confirmed jobs continue independently of the browser. Reopening the app refreshes tracked snapshots while the original server job remains available. The server retains bounded, in-memory completed jobs for tracking; it has no durable job dispatcher. A server restart or a different server instance can make a job unavailable. The UI then records Interrupted, retains the observed history, and directs the operator to Azure Portal before retrying. It never silently replays a deployment.

Use the same stable Data Protection configuration as Vault and preserve session affinity for server-local jobs. Clearing browser data removes local deployment history and tracking access. Clearing server keys can prevent existing tracking capabilities from being decrypted.

Server prerequisites

Webfrontend's container includes the pinned .NET 11 SDK and checksum-verified Aspire and Bicep CLIs for x64 and ARM64. A locally hosted Webfrontend needs the .NET 11 SDK, Aspire 17 on PATH, and Bicep. Default discovery checks the normal bicep executable and the Azure CLI-managed .azure/bin installation. Build isolation clears ambient credentials and restores from the public package feed proxy and NuGet.org by default. An explicitly configured alternate feed must carry the exported project's packages.

Optional server configuration:

{
  "WorkflowDeployments": {
    "Enabled": true,
    "DotnetPath": "dotnet",
    "BicepPath": "bicep",
    "NuGetSource": "https://packagefeedproxy.microsoft.io/nuget/v3/index.json"
  }
}

NuGetSource accepts a credential-free HTTPS service index URL. Configure an administrator-approved reachable public package feed when the host has different egress rules. Allow required package downloads, Microsoft Entra token acquisition, Azure Resource Manager calls, and ACR's signed Azure Blob source uploads. ACR Tasks needs access to its container base images and package sources.

Set WorkflowDeployments:Enabled to false to hide the Package menu action and reject new deployment requests. Existing local history remains available for inspection.

An unhandled error has occurred. Reload 🗙