Skip to content

Pulling image from mcr.microsoft.com fails with 401 #7246

@Just-a-normal-Phoenix

Description

@Just-a-normal-Phoenix

Describe the bug

When attempt to pull any docker image from mcr.microsoft.com, it returns

Error response from daemon: failed to resolve reference "mcr.microsoft.com/dotnet/framework/sdk:4.8": pull access denied, repository does not exist or may require authorization: authorization failed: no basic auth credentials

For example run:
docker pull mcr.microsoft.com/dotnet/sdk:8.0

Also happens with different error message when building images that depend on image from mcr see:

#2 [internal] load metadata for mcr.microsoft.com/dotnet/sdk:8.0
#2 ERROR: failed to authorize: failed to fetch anonymous token: unexpected status from GET request to https://mcrprod.azurecr.io/oauth2/token?scope=repository%3Adotnet%2Fsdk%3Apull&service=mcrprod.azurecr.io: 401 Unauthorize

Which .NET image(s) are you using?

mcr.microsoft.com/dotnet/sdk:8.0

Steps to reproduce

see above

Other information

No response

Output of docker version

Client: Docker Engine - Community
 Version:           29.4.1
 API version:       1.54
 Go version:        go1.26.2
 Git commit:        055a478
 Built:             Mon Apr 20 16:32:37 2026
 OS/Arch:           linux/amd64
 Context:           default

Output of docker info

Client: Docker Engine - Community
 Version:    29.4.1
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.33.0
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v5.1.3
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions