az acr build giving TasksOperationsNotAllowed error

Shende, Toyesh (DDC Delivery) 20 Reputation points
2026-06-04T14:47:44.3266667+00:00

i am not able to build image with command

az acr build `

  --registry $env:ACR_NAME `

  --image $env:CONTAINER_IMAGE `

  --file api/Dockerfile `

  api/

giving below log

Packing source code into tar to upload...

Uploading archived source code from 'C:\Users\P50143~1\AppData\Local\Temp\build_archive_2a115270b1b640fe9630ffded547d9f9.tar.gz'...

Sending context (3.108 KiB) to registry: acr6bb20cda...

(TasksOperationsNotAllowed) ACR Tasks requests for the registry acr6bb20cda and 8a985e1b-5327-432c-b505-5cb36f03485b are not permitted. Please file an Azure support request at http://aka.ms/azuresupport for assistance.

Code: TasksOperationsNotAllowed

Message: ACR Tasks requests for the registry acr6bb20cda and 8a985e1b-5327-432c-b505-5cb36f03485b are not permitted. Please file an Azure support request at http://aka.ms/azuresupport for assistance.

Target: request

Azure Container Registry
Azure Container Registry

An Azure service that provides a registry of Docker and Open Container Initiative images.

0 comments No comments

Answer accepted by question author
Manish Deshpande 8,135 Reputation points Microsoft External Staff Moderator
2026-06-21T06:33:05.0066667+00:00

Hello @Shende, Toyesh (DDC Delivery)

Thanks for the detailed log — that pinpoints it, and I understand how blocking this is when you're just trying to build an image.

Good news first: there's nothing wrong with your command or your Dockerfile. az acr build doesn't build locally — it hands the build to ACR Tasks, which runs in the cloud. The TasksOperationsNotAllowed error means the service is declining to run that cloud task for your registry.

Root cause: Azure Container Registry is currently pausing ACR Task runs that are funded by Azure free credits (Free Trial, Azure for Students, or promotional credits). That's exactly why your context uploads successfully and then the request is rejected right before the build starts. This is a platform-side restriction, confirmed in the official docs:

"Azure Container Registry task runs are temporarily paused from Azure free credits."ACR Tasks overview

You can confirm your subscription type with:

az account show --query "{name:name, state:state, id:id}"

Two ways forward:

  1. Permanent fix move the subscription to Pay-As-You-Go This is what resolves the error for others hitting it, because it lifts the free-credit restriction on ACR Tasks. Your resources stay intact — it's a billing-plan change: Upgrade your Azure account. One thing to be aware of: switching the plan itself isn't charged, but Pay-As-You-Go removes the free-credit cushion, so actual resource consumption (including ACR Task build minutes) will bill to your payment method going forward. After upgrading, your existing command works unchanged:
az acr build --registry $env:ACR_NAME --image $env:CONTAINER_IMAGE --file api/Dockerfile api/
  1. Immediate workaround : build locally with Docker and push If you can't change the plan right now and have Docker running locally (this won't work in Azure Cloud Shell, which has no Docker daemon), you can bypass ACR Tasks entirely:
az acr login --name $env:ACR_NAME
docker build -t "$($env:ACR_NAME).azurecr.io/$($env:CONTAINER_IMAGE)" -f api/Dockerfile api/
docker push "$($env:ACR_NAME).azurecr.io/$($env:CONTAINER_IMAGE)"
az acr repository list --name $env:ACR_NAME --output table

Same result (image in your registry), without using cloud tasks.

If your subscription is already Pay-As-You-Go and you still see this, then it isn't the credit restriction — in that case, file an Azure support request for registry acr6bb20cda as the error suggests so we can review the block on that specific registry.

To help me confirm: is this subscription a Free Trial / Azure for Students, or already Pay-As-You-Go? That tells us immediately whether option 1 is your fix.

Links:
https://learn.microsoft.com/en-us/azure/container-registry/container-registry-tasks-overview
https://learn.microsoft.com/en-us/azure/container-registry/container-registry-get-started-docker-cli?tabs=azure-cli

https://learn.microsoft.com/en-us/cli/azure/acr?view=azure-cli-latest#az-acr-build

Thanks,
Manish.

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Newest
  1. AI answer

    2026-06-04T14:48:01.29+00:00

    The error indicates that ACR Tasks operations are blocked for this registry, so az acr build cannot run.

    az acr build is implemented as an ACR Task “quick task” that runs the Docker build in Azure. When Tasks are not permitted for a registry, any az acr build or az acr pack build invocation fails before the actual build starts, exactly as shown in the log (context upload succeeds, then the service rejects the task request).

    Because the registry is refusing all ACR Tasks requests, there is no client-side fix in the CLI or command syntax. The only supported resolution is to have the restriction on ACR Tasks removed for that registry by Azure support.

    Practical options:

    1. Open an Azure support request for this specific registry ID and error code so that ACR Tasks can be enabled for it, as the error message instructs.
    2. As a temporary workaround while waiting for support, build and push images using a local Docker engine instead of ACR Tasks:
      • Use docker build -t <registry-name>.azurecr.io/<image>:<tag> .
      • Then docker push <registry-name>.azurecr.io/<image>:<tag>

    Once ACR Tasks are permitted again, the same az acr build command will work and behave as described in the ACR quick tasks and tutorials.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.