AzCopy login fails

2020-06-12 05:17发布

After running azcopy login and signing in with my Azure account, I see the following response on the sign in page:

“User account from identity provider does not exist in tenant ‘Microsoft’ and cannot access the application in that tenant. This account needs to be added as an external user in the tenant first. Sign out and sign back in again with a different Azure Active Directory user account.”

Am I missing something like an App Registration?

2条回答
趁早两清
2楼-- · 2020-06-12 05:45

You are probably facing this issue because you are not specifying your Azure AD tenant-id while trying to login with azcopy.exe

So instead of

azcopy.exe -login

You should do

azcopy.exe -login --tenant-id=yourtenantid
  • When you don't specify any tenant-id it tries to login to "Microsoft.com" tenant, where obviously your specific Azure AD user like kyle@myaad.onmicrosoft.com doesn't exist and hence the error.
  • If you don't know your Azure AD Tenant Id already, one of the many ways to find it is by going to Azure Portal > Azure Active Directory > Your specific Azure AD > Properties (The Guid in Directory ID field is your Azure AD Tenant ID)

    enter image description here

  • On a side note, I was able to reproduce your issue doing exactly just the login without my tenant mentioned and then able to successfully login by specifying the tenantid appropriately.

    Issue using only azcopy.exe login enter image description here

    Successful login using azcopy.exe login --tenant-id=fa89xxxxxxxx enter image description here

查看更多
等我变得足够好
3楼-- · 2020-06-12 05:47

You need to sign in with an MSA account that is already part of an Azure Tenant

查看更多
登录 后发表回答