Hello Samuel Taylor-Hansen,
Greetings! Welcome to Microsoft Q&A Platform.
The error InvalidAutoStorageAuthenticateMode
typically indicates a problem with the authentication mode being used when attempting to link a storage account to an Azure Batch account using a managed identity. While this specific error code isn’t directly referenced in the Azure documentation, it falls under the category of 4xx errors which typically indicate that a resource isn’t in the correct state for the requested operation which is updated in this doc - https://learn.microsoft.com/en-us/azure/batch/error-handling#error-codes.
Ensure that the user-managed identity has the correct role assignments to access the storage account. It should have at least “Storage Blob Data Contributor” role and you have followed steps over this reference article - https://learn.microsoft.com/en-us/troubleshoot/azure/hpc/batch/use-managed-identities-azure-batch-account-pool#use-a-managed-identity-to-access-your-autostorage-account.
Verify that the authentication mode set for the storage account is compatible with Azure Batch. Azure Batch supports using Azure AD-based authentication with managed identities for accessing Azure Storage accounts. When setting up your storage account to use with your batch account, you need to link the storage account to your batch account and set the autostorage account to use the batch account managed identities as its authentication mode refer - https://learn.microsoft.com/en-us/rest/api/batchservice/authenticate-requests-to-the-azure-batch-service
Please refer this Azure Batch setup with storage account documentation - https://techcommunity.microsoft.com/t5/azure-paas-blog/the-usage-of-managed-identity-in-the-azure-batch-account-and/ba-p/3607014 which can provide more detailed guidance specific to your setup and the error you’re facing.
Hope this helps! Please let us know if you have any further queries. I’m happy to assist you further.
Please "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.