2
votes

I am trying to use Docker images from an Azure Container Registry as tasks in Azure Batch. In the Docker CLI, I can authenticate to the ACR using an Active Directory Service Principal's credentials, with the application ID as the username and the key as the password, as per the ACR documentation.

When I attempt to use the web portal to manually enter those credentials in the a new pool VM container registry settings, I receive the following error on submission:

The value provided for one of the properties in the request body is invalid.

The maximum length of user name that can be specified on a containerRegistry is 20

If I use the AzureRm.Batch Powershell module cmdlets, the pool is created however the containerRegistry and containerImages properties are null.

Can this AD SP authentication method be used with Azure Batch VM container registration configuration? Do I need to use a specific SDK to accomplish this?

1
I looked at the documentation but I did not try to POST to the REST API.jmlane
Powershell—and the .NET SDK it wraps—call out to the REST API as you can see in the debug output. Stands to reason this character limit is part of the REST API.jmlane

1 Answers