Hello, during the development of a new functionality, which requires us to import a docker image to ACR from another ACR placed in another subscription and different tenant - by using Import-AzContainerRegistryImage command - we found a bug which makes impossible to import image using username and password.
After small debugging session we found that username and password fields that are send to API are swapped. In username field there is password value and vice-versa.
As you can see: username value is used as password and password is used as username.
For now temporary fix for us is to provide password as username and username as password in Import-AzContainerRegistryImage command so the request to API contains proper values.
Description
Hello, during the development of a new functionality, which requires us to import a docker image to ACR from another ACR placed in another subscription and different tenant - by using Import-AzContainerRegistryImage command - we found a bug which makes impossible to import image using username and password.
After small debugging session we found that username and password fields that are send to API are swapped. In username field there is password value and vice-versa.
The problem is in this line: https://github.com/Azure/azure-powershell/blob/7f774d3ae25fe925b61b55b43cbcfe23bfc2031f/src/ContainerRegistry/ContainerRegistry/Commands/ImportAzureContainerRegistryImage.cs#L88
And here is PSImportSourceCredentials constructor definition: https://github.com/Azure/azure-powershell/blob/7f774d3ae25fe925b61b55b43cbcfe23bfc2031f/src/ContainerRegistry/ContainerRegistry/Models/PSImportSourceCredentials.cs#L25
As you can see: username value is used as password and password is used as username.
For now temporary fix for us is to provide password as username and username as password in Import-AzContainerRegistryImage command so the request to API contains proper values.
Steps to reproduce
Environment data
Module versions
Debug output
Error output