MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.26k stars 21.43k forks source link

Azcopy login is depriciated? #122854

Closed amazingdragi closed 4 months ago

amazingdragi commented 5 months ago

Is this true? https://github.com/Azure/azure-storage-azcopy/issues/831

How can we use azcopy with user managed identity?

Kind regards, Dragi


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

PesalaPavan commented 5 months ago

@amazingdragi Thanks for your feedback! We will investigate and update as appropriate.

SaibabaBalapur-MSFT commented 4 months ago

@amazingdragi To use AzCopy with a user-assigned managed identity, you need to set the AZCOPY_AUTO_LOGIN_TYPE environment variable to MSI. You can then run AzCopy without logging in by using the azcopy copy command. Here are the steps to follow:

  1. Assign a user-assigned managed identity to your VM or Azure resource.
  2. Grant the managed identity the necessary permissions to access your storage account.
  3. Set the AZCOPY_AUTO_LOGIN_TYPE environment variable to MSI.
  4. Run the azcopy copy command.

Regarding your second question, azcopy login is not deprecated. It is still a valid command to use for logging in to Azure AD. However, if you want to use a managed identity instead of a login, you can set the AZCOPY_AUTO_LOGIN_TYPE environment variable to MSI.

Since this issue isn't directly related to improving our docs, and to gain a better understanding of your issue, I'd recommend working closer with our support team via an Azure support request. Or you can leverage our Q&A forum by posting your issue there so our community, and MVPs can further assist you in troubleshooting this issue or finding potential workarounds. Teams Q&A forum for technical questions about the configuration and administration of Microsoft Teams on Windows. Microsoft Teams Community forum