Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AzCopy authenticate: Selected user account does not exist in tenant

I need to download a blob from my blob storage. I am trying to authenticate my user identity as described here https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10

azcopy login

When I follow the directions, and enter the provided code into the webform, I'm told:

Selected user account does not exist in tenant 'Microsoft Services' and cannot access the application '<>' in that tenant. The account needs to be added as an external user in the tenant first. Please use a different account.

I am using my main admin Azure account user (owner), which is the only one I've set up.

I have obviously tried to Google this and looked at the directions and looked at other question/answers. It's a freaking rabbit hole of links to page with more links. Please, where do I click, what do I type, to create this user that I need, or how do I give my admin user whatever it needs?

I looked here https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-create-new-tenant for how to create a tenant, but one of the steps is to type in the domain. What domain? Do I need a domain to download a blob?

I also thought that maybe I need to provide a tenant id:

azcopy login --tenant-id=<tenant-id>

But where do I find a tenant ID? I figured out that this is apparently the same as the directory id.

I tried to do:

My storage account > Properties

but there is nothing here called tenant or directory id.

like image 259
user984003 Avatar asked Jun 20 '20 14:06

user984003


1 Answers

The issue wasn't related to the user, but that I needed to provide a tenant id

azcopy login --tenant-id=<tenant-id>

To get the tenant-id:

In the Azure portal dashboard:

  • Search Azure Active Directory
  • Choose Azure Active Directory
  • Copy the Tenant ID
like image 196
user984003 Avatar answered Sep 28 '22 11:09

user984003