admin管理员组

文章数量:1122832

I'm trying to enable a continuous deployment trigger, but I'm receiving the following error:

AzureContainerRepository Unable to set up a webhook on the selected Azure Container Registry. Triggers are only supported for managed registries. Either it's not a managed registry, or the access token doesn't have sufficient permissions to perform the operation. InnerException: {"error":{"code":"AuthenticationFailedMissingToken","message":"Authentication failed. The 'Authorization' header is missing the access token."}}

  • My service connection has the Contributor role.
  • This is the 6th webhook; previously, it worked without any problems. (that means I didn't hit the limit of webhooks)
  • My registry is set to the Standard tier.

I'm trying to enable a continuous deployment trigger, but I'm receiving the following error:

AzureContainerRepository Unable to set up a webhook on the selected Azure Container Registry. Triggers are only supported for managed registries. Either it's not a managed registry, or the access token doesn't have sufficient permissions to perform the operation. InnerException: {"error":{"code":"AuthenticationFailedMissingToken","message":"Authentication failed. The 'Authorization' header is missing the access token."}}

  • My service connection has the Contributor role.
  • This is the 6th webhook; previously, it worked without any problems. (that means I didn't hit the limit of webhooks)
  • My registry is set to the Standard tier.
Share Improve this question edited Nov 21, 2024 at 22:32 Rui Jarimba 17.4k11 gold badges64 silver badges97 bronze badges asked Nov 21, 2024 at 17:25 Maciek PsiukMaciek Psiuk 331 silver badge7 bronze badges 1
  • Hi @MaciekPsiuk, Good day. Have you got a chance to check my answer below to refence an ARM service connection authenticating against client id and secret to enable CD trigger of the release pipeline? Hope the issue can be resolved from your side as well. Thx. – Alvin Zhao - MSFT Commented Nov 25, 2024 at 6:59
Add a comment  | 

1 Answer 1

Reset to default 1

Based on your description, the issue probably occurred when you were attempting to enable the continuous deployment trigger of an Azure Container artifact in a release pipeline, which should have generated a webhook in the selected ACR.

You didn't mention, but I could reproduce the issue when the ACR artifact was added by referencing an ARM/Docker Registry service connection that authenticated against the workload identity federation.

With that being said, the workaround is to add Azure container artifacts and enable its CD trigger by referencing a service connection that authenticates against client id and secret of the underlying application. You may create a new service connection or take a look at your Project Settings, since you could have probably got such a service connection already.

After enabling the CD trigger and saving the release pipeline, you can check your ACR and see if there is a newly created webhook pointing to the Azure DevOps release pipeline management server.

It is also suggested you add container resources in a YAML pipeline, which supports continuous resource trigger upon pushing new tag of image to ACR even if it references the ARM service connection using WIF.

resources:
  containers:
  - container: MyACR
    type: acr
    azureSubscription: ARMSvcCnnWIFSub0
    resourceGroup: rg-azacr
    registry: azacrxxxxxx
    repository: containerapp/dotnet/samplerepo1
    trigger: true

pool:
  vmImage: ubuntu-latest

steps:
- script: |
    echo "MyACR.type - $(resources.container.MyACR.type)"
    echo "MyACR.registry - $(resources.container.MyACR.registry)"
    echo "MyACR.repository - $(resources.container.MyACR.repository)"
    echo "MyACR.tag - $(resources.container.MyACR.tag)"
    echo "MyACR.digest - $(resources.container.MyACR.digest)"
    echo "MyACR.URI - $(resources.container.MyACR.URI)"
    echo "MyACR.location - $(resources.container.MyACR.location)"

本文标签: Unable to setup webhook at Azure DevOps pipelineStack Overflow