On this page
Azure resource
Workflow reference | Azure deployments | Entra ID Auth
Kind: AzureResource
Configuration object: azureResource
The Azure toolbox includes Azure Blob Storage, Azure Storage Queue, and Azure Event Grid widgets. Configure an existing resource for Preview, then provision a separate workflow-owned resource set through Deploy to Azure.
Inputs
Operation templates accept {{input}} and named-input paths. JSON content preserves value types and escapes strings. Blob path segments are URL-encoded after rendering. Resource identity, credential bindings, endpoints, and container or queue names are static configuration.
Preview needs an explicitly configured service principal. Select it from Vault or enter its tenant, Application ID, and session-only client secret. Connect and list subscriptions enumerates enabled subscriptions, compatible storage accounts or custom topics, and the selected account's containers or queues. Discovery follows bounded ARM pagination and rejects cross-origin, cross-path, and repeated continuation links. It never requests storage keys or Event Grid keys.
Discovery requires Reader permissions. Preview data access additionally requires the appropriate Blob Data, Queue Data, or EventGrid Data Sender role. Browser Preview requires CORS permission on the Azure service for the PWA origin.
Configuration
| Property | Default | Usage |
|---|---|---|
kind |
BlobStorage |
BlobStorage, StorageQueue, or EventGrid. |
operation |
WriteBlob |
Blob: ReadBlob, WriteBlob, UploadMedia, ListBlobs. Queue: Enqueue, PeekMessages. Event Grid: PublishEvent. |
bindingName |
"MEDIA_ASSETS" |
Deployment binding. Use 1-64 uppercase letters, digits, or underscores, starting with a letter. Shared bindings require matching kind and resource name. |
endpoint |
"" |
Existing Preview service endpoint. Commercial-cloud Blob and Queue account origins or a custom topic's /api/events endpoint. Query strings, SAS tokens, credentials, and arbitrary hosts are rejected. |
resourceName |
"media-assets" |
Container or queue name; Event Grid deployment topic prefix. Use 3-63 lowercase letters, digits, or single internal hyphens. Topic deployment adds a unique suffix. |
subscriptionId |
"" |
Preview discovery subscription GUID. |
resourceId |
"" |
Selected Preview storage account or Event Grid topic ARM resource ID. |
blobName |
"brief.json" |
Blob path template; prefix for ListBlobs. Blob paths reject empty, . and .. segments. |
content |
"{{input}}" |
JSON or text blob content, queue work item, or Event Grid data object. |
mediaSource |
"{{input._workflow_media[0].reference}}" |
UploadMedia source: a run-local media reference or public HTTPS media URL. |
contentType |
"application/json" |
WriteBlob content type. Media uploads retain the artifact's type. |
overwrite |
false |
Blob writes use If-None-Match: * until overwriting is explicitly enabled. |
eventType |
"Media.ReviewRequested" |
Event Grid type template, at most 128 rendered characters. |
subject |
"workflows/media" |
Event Grid subject template, at most 1,024 rendered characters. |
authentication |
Entra configuration with credentialName: "AZURE_MEDIA_AUTH" |
Preview principal identification and credential binding. See Entra configuration. Resource steps support the commercial cloud and use managed identity in packaged production. The operation selects the Storage or Event Grid audience; discovery selects ARM. |
Resource steps acquire audience-specific Entra tokens without exposing auth objects to the graph. Media source downloads receive no Azure authorization header.
Queue work items must fit 64 KiB after Base64 encoding. Store large manifests and binary assets in Blob Storage and enqueue references. Messages have a seven-day TTL. PeekMessages reads up to 16 messages while preserving queue state. ListBlobs returns one page of up to 100 names and its nextMarker.
Event Grid publishes one Event Grid-schema event, including an ID, UTC timestamp, type, subject, data version, and JSON data object. The complete event must fit 1 MiB. Media uploads are bounded to 128 MiB and the host's configured response budget. Operations honor workflow cancellation and node timeouts.
Outputs
| Operation | Output |
|---|---|
ReadBlob |
Completed JSON or text content; supported binary media returns _workflow_media and a run-local artifact. |
WriteBlob, UploadMedia |
Private blobUrl, container, blobName, and returned etag. These URLs carry no SAS credentials. |
ListBlobs |
blobs with names and content types, plus nextMarker. |
Enqueue |
Azure messageId and queue name. Pop receipts are excluded. |
PeekMessages |
Message IDs and decoded UTF-8 content. |
PublishEvent |
Event ID and accepted: true after successful Event Grid ingress. |
Writes and publications are single-use requests without automatic retries. A network failure can leave an uncertain write outcome. Consumers must deduplicate by a durable media job ID. Event acceptance does not establish subscriber completion. Configure Event Grid subscriptions and queue consumers separately.
Example
{
"id": "archive-manifest",
"name": "Archive reviewed media manifest",
"kind": "AzureResource",
"timeoutSeconds": 300,
"azureResource": {
"kind": "BlobStorage",
"operation": "WriteBlob",
"bindingName": "MEDIA_ASSETS",
"endpoint": "https://mediastore.blob.core.windows.net/",
"resourceName": "media-assets",
"blobName": "{{input.jobId}}/manifest.json",
"content": "{{input}}",
"contentType": "application/json",
"overwrite": false,
"authentication": {
"credentialName": "AZURE_MEDIA_AUTH",
"useManagedIdentityInProduction": true
}
}
}
Use a unique job ID for each draft. Select the corresponding existing account and container before Preview.
Deployment
The generated Aspire package declares resources in infra/main.bicep and provisions them with infra/azure-resources.bicep. It creates a StorageV2 account with private containers and queues, plus custom Event Grid topics with local-key authentication disabled. The application identity receives container-scoped Storage Blob Data Contributor, queue-scoped Storage Queue Data Contributor, and topic-scoped EventGrid Data Sender.
The application revision initializes AzureResources__<BINDING>__Endpoint and AzureResources__<BINDING>__ResourceName. Exported hosts require these configuration values and never fall back to Preview endpoints. Preview contents and service-principal secrets are excluded from provisioning and container source. Input data must be explicitly uploaded to the new resources if the workflow reads existing blobs.