Update to using new azcopy auto-login (#5080)

azcopy login is going to be deprecated soon in version 10.22 so
we need to move to the new auto-login model that is documented at
https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-authorize-azure-active-directory#authorize-a-service-principal-by-using-a-client-secret

Co-authored-by: Wes Haggard <Wes.Haggard@microsoft.com>
This commit is contained in:
Azure SDK Bot 2023-10-27 14:12:31 -07:00 committed by GitHub
parent 71416d73b1
commit 6aec2a3807
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,12 +0,0 @@
param (
[Parameter(Mandatory = $true)]
[string] $SourceBlobPath,
[Parameter(Mandatory = $true)]
[string] $ApplicationId,
[Parameter(Mandatory = $true)]
[string] $DestinationDirectory
)
azcopy login --service-principal --application-id $ApplicationId
Write-Host "Copying from $SourceBlobPath to $DestinationDirectory ..."
azcopy cp "${SourceBlobPath}/*" $DestinationDirectory --recursive=true