You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Publish-PSResource to Azure Container Registry throws an error, when anonymousPullEnabled: true #1828
I was looking for a way to allow my users to download (pull) PowerShell modules from our Azure Container Registry (ACR) without requiring authentication. I found the anonymousPullEnabled property in the ACR settings and set it to $true. This allowed users to pull modules from our ACR without authentication.
However, when I try to upload new modules (while already signed in with my admin account using Connect-AzAccount), I receive the error shown in the attachment.
Is there a better approach to allow users to pull modules from our ACR anonymously? Or am I on the wrong path? Assuming that Microsoft Artifacts hosted on ACR support anonymous pulls, it seems like this should also be possible for us — but I haven’t found any guidance online how to set this up.
Expected behavior
A login prompt, or using my current Az Session.
Actual behavior
I get the error: Publish-PSResource: One or more errors occurred. (Error occured while starting to upload the blob location used for publishing to ContainerRegistry: System.Net.Http.HttpRequestException 'Error occured while trying to retrieve response header: Error occured while trying to retrieve response: Response status code does not indicate success: 401 (Unauthorized).')
Error details
Environment data
1.1.1 Microsoft.PowerShell.PSResourceGet
Name Value
---------
PSVersion 7.5.0
PSEdition Core
GitCommitId 7.5.0
OS Microsoft Windows 10.0.26100
Platform Win32NT
PSCompatibleVersions {1.0,2.0,3.0,4.0}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.
Activity
SydneyhSmith commentedon Aug 6, 2025
milosbithawk does your account have explicit push permissions to this repo?
microsoft-github-policy-service commentedon Aug 11, 2025
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.