Store files in Azure Blob Storage
Connect a Builder app to Azure Blob Storage using managed identity instead of storage keys. A Node.js sample API and static frontend upload, list, download, and delete files; credentials never reach the browser.
Use disposable files and a separate test account; don't relax an existing account's firewall. A private container disables anonymous reads, not the public network endpoint. Managed identity protects app-to-storage access, not visitors: every allowed visitor can read, write, and delete every file, so require Builder visitor sign-in with explicit testers.
Prerequisites
- An Azure subscription in West US 2 (
westus2) with Node.js 24 support. - Git, Azure CLI with Bicep, and permission to provision storage and assign data roles (app creation permission alone isn't enough).
- A GitHub fork with the Builder GitHub App installed before provisioning, including public forks (GitHub authorization).
- A storage endpoint reachable from Builder, which has no VNet/private endpoint connectivity or stable outbound IP.
1. Prepare the sample and storage
Clone the sample
Fork the Blob Storage sample and clone your fork:
git clone "<your-fork-https-url>" filevault
cd filevault
Provision Blob Storage
Set a new test resource group and a globally unique storage name (3-24 lowercase letters and digits):
SUBSCRIPTION="<subscription-id>"
TENANT="<tenant-id>"
RG="<new-test-resource-group>"
STORAGE="<globally-unique-storage-account-name>"
STORAGE_LOCATION="westus2"
az login --tenant "$TENANT"
az group create --subscription "$SUBSCRIPTION" \
--name "$RG" --location "$STORAGE_LOCATION"
az deployment group what-if --subscription "$SUBSCRIPTION" \
--resource-group "$RG" --name filevault-storage \
--template-file infra/main.bicep \
--parameters storageAccountName="$STORAGE" location="$STORAGE_LOCATION"
Review storage costs. The template creates Standard_LRS/Hot StorageV2 with HTTPS only, Shared Key disabled, and a private filevault container.
az deployment group create --subscription "$SUBSCRIPTION" \
--resource-group "$RG" --name filevault-storage \
--template-file infra/main.bicep \
--parameters storageAccountName="$STORAGE" location="$STORAGE_LOCATION"
az deployment group show --subscription "$SUBSCRIPTION" \
--resource-group "$RG" --name filevault-storage \
--query properties.outputs -o json
Record blobEndpoint, containerScope, and storageAccountId. Keep keys and connection strings out of app variables.
2. Create the app and enable managed identity
Review the build settings
The sample has two independent component roots:
| Setting | Frontend | API |
|---|---|---|
| Component and source directory | static, client/ | web, server/ |
| Platform | nodejs, version "24" | nodejs, version "24" |
| Custom build | npm ci --include=dev && npm run build:builder | npm ci --omit=dev && npm run build:builder |
| Output or startup | dist | node index.js |
| App path | / | /api, port 8080 |
| Health check | None | /api/health checks process health, not Blob access |
Keep Vite/React dependencies in client/, not the API package. Leave AZURE_CLIENT_ID unset for the system-assigned identity (managed identity covers user-assigned).
The Blob connection can instead use a protected connection string when managed identity is not available. Connection strings can contain an account key or SAS and require the selected account to allow that authentication method. Enter the value only in Builder Portal. Ordinary reads and Builder CLI output omit it.
Create the app
Use your test group and West US 2. In Authentication, require Microsoft Entra sign-in. After creation, enable a system-assigned identity on the app's Identity page. If initial health fails before configuration is complete, keep the app and continue.
Keep the fork, branch, and root builder.yaml you prepared above.
Builder deploys committed GitHub source, not uncommitted local files.
- Portal
- Builder CLI
Open the App Service Builder Portal.
Your Azure account needs permission to create and deploy Microsoft.Web/builderApps resources.
Creating a resource group also requires permission to create groups in the selected subscription.
-
Sign in to the Portal with your Microsoft account.
-
Select the subscription and choose Create.
-
In Choose approach, keep Let Builder handle it selected and select Next.

Choose Builder-managed GitHub source for this procedure. ZIP deploy is the separate local-source path; include a root builder.yamlfor ZIP deployments. Review authentication and the target before submitting either approach. -
In Connect GitHub, sign in to GitHub and authorize the OAuth App. Keep Use my repository selected to deploy the fork you prepared above. Choose the account or organization that owns your fork, then select that repository and branch. Use Change account if you need a different GitHub account, or Refresh access after changing repository permissions. The App Service Builder GitHub App needs access to this repository to read your code, build it, and deploy your app. Signing in to GitHub alone does not grant this access. If prompted, select Install GitHub App and grant access to your selected repository, or add it to an existing installation. Close the GitHub window to refresh access, or select Refresh access after approval. Select Next when Builder is connected and GitHub App access confirmed are shown. To keep the defaults, select Review directly once it is enabled. Builder generates an app name, uses the selected subscription and first available resource group, and supplies the app region. You do not need to visit Authentication or App details when their defaults meet your needs. Review the authentication summary before creating; organization-required sign-in defaults still apply.
-
In Authentication, configure visitor sign-in. Review the sign-in mode; some organization directories default to required tenant sign-in. When offered, select Apply under Require sign-in with a work account from your organization to limit the app to accounts in your Microsoft Entra directory. Select Off only if you intend to allow anonymous visitors. Select Next.
-
In App details, enter an app name and select the subscription, resource group, and West US 2 (
westus2). To create a resource group, select Create new, enter its name, and choose Resource group region. Select Add. The group appears as (new) and is created when you submit. Its region stores the resource group's metadata and does not change the app's region. Select Next. -
On Review and create, confirm the app, repository, branch, subscription, resource group, app region, and authentication choices. Select Create and deploy.
-
Open the app's Versions page and wait for the deployment to succeed. Open a version to inspect its source revision, component results, and build logs. Choose View logs to inspect the latest deployment's steps and logs. On Overview, use Browse to open the app URL.
Managed identity is separate from visitor sign-in and is not assigned during Portal creation. To let the app access Azure resources, configure managed identity afterward from the app's Identity page.
Already prepared a fork? Keep Use my repository selected so you deploy that source, not a second copy. To start with a new sample instead, follow Create from a Portal template. Use GitHub Actions is marked Coming soon; use the Builder-managed approach for this preview.
If group creation fails, app creation does not start. If the group was created before a later failure, it remains in Azure; cancelling does not delete it. Check the existing group and app before retrying, and inspect a group's contents before deleting it separately.
See GitHub authorization requirements for organization approvals and SSO. If app creation succeeds but deployment cannot start, read the error and retry deployment on the existing app rather than creating a duplicate. For “Source revision does not contain builder.yaml”, push the missing manifest before retrying.
Choose a browser or terminal download.
Download in your browser: open Builder releases and select the latest Builder CLI release, including Preview releases.
Under Assets, download azure-builder-cli-<version>.tgz.
Choose the CLI archive rather than a canvas package or GitHub's automatic Source code ZIP or tarball.
Download from your terminal: with GitHub CLI installed, run this command in the directory where you want to save the archive:
Replace <cli-release-tag> with the tag of the latest Builder CLI release selected from the releases page above.
Specify that tag because the same repository also publishes canvas releases.
gh release download "<cli-release-tag>" --repo microsoft/azure-app-service-builder --pattern "azure-builder-cli-*.tgz"
The command downloads the CLI archive into the current directory.
It refuses to overwrite an existing file; choose another directory if the archive is already present.
Release archives use the name azure-builder-cli-<version>.tgz.
Use the same portable npm archive on Windows, Linux, and macOS; there is no separate OS/CPU-specific CLI download.
Install Node.js 22 or later, including npm.
Install or upgrade using your downloaded archive directly:
npm install --global "<path-to-downloaded-file.tgz>"
builder --version
Confirm that builder --version matches the CLI version listed in your selected release.
Replace <path-to-downloaded-file.tgz> with the local path to the archive you downloaded.
For a terminal download, use ./azure-builder-cli-<version>.tgz with the actual downloaded filename while in the same directory.
Confirm your Azure subscription and an available region, then follow access and sign-in.
Do not extract the archive.
npm registry access is still required for JavaScript dependencies; access to Builder's private source repository is not required.
Installing the CLI does not grant Azure resource permissions or install the separately distributed agent skills plugin.
The .NET runtime is needed only for local builder manifest commands.
You can install Builder and run builder login, builder app create, and
builder app deploy without .NET.
The archive includes the local manifest analyzer and its dependencies, but not the .NET runtime.
For optional local manifest validation, install a compatible .NET 10 runtime and keep dotnet on PATH.
The analyzer requires Microsoft.NETCore.App 10.0.0 or a compatible runtime.
A .NET SDK is not required to use Builder; an existing compatible SDK's included runtime is sufficient.
Check installed runtimes with:
dotnet --list-runtimes
Use your installed Builder CLI and GitHub CLI (gh) to connect your source.
The App Service Builder GitHub App must have access to your selected repository so Builder can read, build, and deploy its code.
See GitHub authorization requirements if access has not been granted.
Reuse a resource group, or create one first with Azure CLI:
az login
az group create --subscription "<subscription-id>" \
--name "<resource-group>" --location "westus2"
Replace the subscription and resource-group placeholders with your values. Only this optional resource-group creation step requires Azure CLI and permission to create resource groups. Builder CLI uses the group you select; it does not create it.
If you have not already cloned your prepared fork, copy its HTTPS clone URL from GitHub and run:
git clone "<your-fork-https-url>"
cd "<local-repository-directory>"
Run builder app create from your app's initialized Git worktree to get useful source defaults.
GitHub sign-in does not select a local repository.
If your terminal is in your home directory, open your cloned app folder or change to it first.
Do not initialize Git in your home directory to get source defaults.
Explicit creation can run outside a Git worktree.
Use the current preview CLI and check builder app create --help for repository options.
Run these commands from your app's checkout:
builder login
builder app create
Choose GitHub repository.
Builder uses the detected repository, branch, and suggested app name without repeated prompts.
It reuses your GitHub CLI sign-in or offers sign-in when needed; no separate source-connect command is required.
Choose an Azure subscription and existing resource group by name, then select West US 2 (westus2) for the app.
If Azure CLI's current subscription is accessible to the same signed-in tenant, it is preselected; Azure CLI is not required.
Review your prepared fork, pushed branch, app name, and Azure target.
Choose Edit settings to change them, Create app to continue, or Cancel.
The app name cannot change after creation.
Keep the app name, subscription ID, and resource group for the deployment commands below.
Creation creates the app and connects the selected GitHub source without uploading local changes.
Creation does not start a deployment.
Use the explicit deployment command after the manifest and source you intend to deploy are committed and pushed.
For explicit automation, see non-interactive setup.
For ZIP/local uploads instead of GitHub, choose ZIP or local files; GitHub sign-in is not required.
builder app create does not automatically analyze or modify builder.yaml.
Deployment requires builder.yaml at the selected source root.
Review your manifest, then commit and push any changes you want to deploy.
Optionally validate the prepared manifest locally without changing files or running repository code. This step requires the separate .NET runtime described in the installation instructions; login, setup, and deployment do not:
builder manifest validate
Request deployment separately:
builder app deploy --name "<app-name>" \
--subscription "<subscription-id>" --resource-group "<resource-group>"
Read the app details:
builder app show --name "<app-name>" \
--subscription "<subscription-id>" --resource-group "<resource-group>"
Deployment waits by default.
After success, use the URL repeated below the deployment output or returned by app show for the checks below.
For a failure, inspect build and deployment diagnostics.
The CLI reference lists selectors, diagnostics, and flags.
For API automation, use the ARM API deployment guide with this same fork, branch, and source root ".".
ARM and Bicep infrastructure templates provision the resource; separately authorize and connect this source, then deploy it through CLI or ARM.
- On Authentication, require Microsoft Entra sign-in and Limit to specific identities with your tenant and tester object IDs (a tenant-only rule permits everyone).
- On Identity, enable the system-assigned identity and select Save and deploy. Record its principal ID, not a client ID.
3. Grant container access and configure the app
Grant Storage Blob Data Contributor at the container scope (Azure Contributor isn't a blob data role).
APP_PRINCIPAL_ID="<app-identity-principal-id>"
az deployment group create --subscription "$SUBSCRIPTION" \
--resource-group "$RG" --name filevault-app-role \
--template-file infra/role.bicep \
--parameters storageAccountName="$STORAGE" principalId="$APP_PRINCIPAL_ID"
Record roleAssignmentId for cleanup. Role propagation can take time; see Blob data-role guidance.
On Connections, add Storage account, select the existing account and app's system-assigned Managed identity, then save these runtime mappings:
| Variable | Value |
|---|---|
AZURE_STORAGE_BLOB_ENDPOINT | The HTTPS blobEndpoint output |
AZURE_STORAGE_CONTAINER | filevault |
Keep APP_ACCESS_MODE=builder as a separate variable (or omit its default) and
leave AZURE_CLIENT_ID unset. The sample is MI-only; the platform's
Connection string alternative does not change its Shared-Key-disabled
dependency or authorize a fallback.
Named connection mappings
The managed-identity Connections workflow
completed hosted Production qualification for Blob Storage with both system-assigned and
user-assigned identities. It records the existing storage account/container and already-assigned identity.
Rename the account-URL mapping to this sample's AZURE_STORAGE_BLOB_ENDPOINT, not the catalog suggestion AZURE_STORAGE_ACCOUNT_URL.
Keep the container mapping AZURE_STORAGE_CONTAINER=filevault.
When replacing manual entries, save their removal without deploying, save the corresponding connection mappings, then deploy the complete desired configuration once.
Retain APP_ACCESS_MODE=builder and documented SDK identity selection separately.
The sample uploads/deletes files, so retain its container-scoped Contributor grant above; the default connection Reader proposal is insufficient for those operations.
Do not submit a second grant merely to save a connection.
Save desired mappings, deploy explicitly, then verify actual file operations.
The deployed catalog exposes this configuration path; actual file operations
still verify the selected source and destination. For a complete connection
object and a guarded update preserving other connections, use the
Builder CLI procedure with a release that includes app connections, or the
Azure CLI/ARM procedure.
Optional: start with synthetic demo files
After connection/access setup, review the sample's demo-files/ and explicitly
upload three tiny fictional TXT/CSV files for a populated first file browser:
npm run seed:files -- --subscription "$SUBSCRIPTION" \
--account-name "$STORAGE" --container-name filevault --confirm-demo-seed
The signed-in Azure CLI setup identity needs its own container-scoped Storage Blob
Data Contributor grant; the app's grant does not authorize the caller. Follow the
sample README's developer-role step if needed. The helper uses Entra login and
conditional create-only uploads under filevault-demo/; repeat runs preserve
existing blobs, never overwrite/delete and never change container public access.
It runs only when explicitly requested, not at app startup. Connections alone do
not create files. Refresh the authenticated app to confirm actual connected content.
Download the seeded TXT/CSV files through the app and compare them with demo-files/;
successful CLI uploads alone do not prove that the file-browser links work.
Local helper tests are separate from hosted file-operation qualification.
4. Deploy and verify file operations
Saving Connections or variables doesn't update the running version. Build and deploy a new version, then open the URL from Overview; signed-out visitors must be asked to sign in.

This capture shows real authenticated UI uploads on the tested sample, not the optional seed helper. It contains synthetic TXT/CSV data; generated UUIDs identify blob names, not users or managed identities.
- Sign in as an allowed tester and upload a small disposable text file.
- Refresh the list and confirm it appears.
- Download it through the app and compare the contents with the original.
- Delete it and refresh to confirm it is gone.

Illustrative queued-upload state from an earlier sample capture; selecting files is not a completed upload. Use harmless test files and verify their saved contents separately.
To check persistence, leave one file, deploy a new version, and confirm it remains.
Troubleshoot connection failures
Check variables, identity, container role, and firewall with service connection diagnostics. A health response doesn't prove Blob access.
Clean up resources
Delete your disposable test files first.
Delete only the test app you created when you no longer need it. App deletion does not remove your GitHub repository, resource group, or separately owned services and user-assigned identities.
On updated targets, deletion first reports that it was accepted and then continues in the background.
In the Portal, keep the Deleting app's progress available until it completes.
With the updated Builder CLI, deletion waits by default; --no-wait returns an operation URL that you can inspect with builder app status.
Closing the client does not cancel an accepted deletion.
Recently published apps can wait for the remaining one-hour upload grant plus a two-minute drain, and provider failures can extend the wait.
The same app name in the same subscription and resource group stays unavailable until deletion finishes.
Full artifact cleanup remains under construction; existing lifecycles retain their earlier cleanup scope.
- Portal
- Builder CLI
Return to the app inventory and choose Delete from the test app's actions. Alternatively, open the app's Settings and select Delete under Danger zone. Enter the exact app name and choose Delete. The dialog closes when the service accepts the request, without waiting for cleanup to finish. The app remains visible as Deleting, with changes disabled while cleanup runs. Deleting from Settings keeps the app open so you can follow its deletion progress.
A notification names the app and reports progress, then success or failure. You can open another app without losing deletion progress. Use the bell beside Docs and All activity to review it. If the request is rejected, the dialog shows the error and lets you retry. Deletion progress includes the current cleanup step and retry details when available. Wait for deletion to complete before creating another app with the same name. Refreshing or closing the Portal clears this session's tracking; it does not cancel server-side cleanup.
builder app delete --name "<app-name>" \
--subscription "<subscription-id>" --resource-group "<resource-group>"
The command asks for confirmation and waits for deletion unless --no-wait is supplied.
If you choose not to wait, track the returned operation before treating cleanup as complete.
Deleting the Builder app doesn't delete storage or stop its charges. After confirming ownership (never delete a shared resource group) and accepting data loss, remove the test role and dedicated account:
az role assignment delete --subscription "$SUBSCRIPTION" \
--ids "<recorded-sample-role-assignment-id>"
az storage account delete --subscription "$SUBSCRIPTION" \
--resource-group "$RG" --name "$STORAGE"