1

I'd like to create connection between pipeline in Azure devops and container registry. Admins created Managed identity for me. I'd like to use that one but there is no way.

According to guide: https://learn.microsoft.com/en-us/azure/devops/pipelines/ecosystems/containers/publish-to-acr?view=azure-devops&tabs=javascript%2Cportal%2Cmsi&fbclid=IwAR2bV28HzRs8v-qTXuo592KU5KxOFnNsOvhxpNx0ZCBYfz2OPnYXWh7rqUs

I should be able to create connection with Authentication type: Managed Service Identity like on below screen: enter image description here

In my case there is no way so select this option. I can only select Service Principial in Authentication type :

enter image description here

That's not what I want. Why is that? Is it related to lack of some permission? Is it maybe forbidden to connect via azure managed identity in the newest azure devops version?. I would be grateful for the answer.

Krzysztof Michalski
  • 791
  • 1
  • 9
  • 25
  • 1
    I can recreate your issue. Looks like Microsoft's documentation is inaccurate. Either the authors have access to a feature that's not available yet, or it's something to do with the "New service connections experience" preview feature that can't be disabled. – James Reed Feb 08 '23 at 16:44

2 Answers2

0

I tried to reproduce your scenario in my environment and got below results:-

When I tried to Create a Service Connection with docker registry even I did not receive any option to Select Managed Service Identity refer below:-

enter image description here

I went to my Project settings and tried creating a service connection with Azure DevOps Managed Identity like below:-

enter image description here

Alternatively:-
You can create Managed Service Identity separately in Azure DevOps by selecting azure Resource Management tab like below:-

enter image description here

  1. Create a managed Identity for your resource
  2. Set Azure role assignments to the managed identity
  3. Create Service connection for that managed identity like above
  4. Include the service connection in the pipeline like below:-
- task: AzureCLI@2

inputs:

azureSubscription: 'acr12325'

enter image description here

Reference:-

Service connections in Azure Pipelines - Azure Pipelines | Microsoft Learn

SiddheshDesai
  • 3,668
  • 1
  • 2
  • 11
  • Set Azure role assignments to the managed identity - How do we grant access? After we create the service connection, it does not show us what managed identity will be used. – Kruti Joshi Jul 20 '23 at 09:43
  • You can assign the role to managed identity via IAM tab of your ACR resource and select the managed identity. – SiddheshDesai Jul 20 '23 at 09:52
  • My question is, how do I know which managed identity the service connection is using? – Kruti Joshi Jul 22 '23 at 12:49
0

Apparently, as MS Support confirmed recently and contrary to what MS documentation says it is not supported :-(

enter image description here

Iliko
  • 63
  • 1
  • 4