Skip to content
This repository has been archived by the owner on Sep 29, 2020. It is now read-only.

no subscriptions found #27

Closed
Hokutosei opened this issue Jul 28, 2020 · 6 comments
Closed

no subscriptions found #27

Hokutosei opened this issue Jul 28, 2020 · 6 comments
Assignees

Comments

@Hokutosei
Copy link

Hokutosei commented Jul 28, 2020

Greetings,

really wanted to try this, but I am having trouble with no subscriptions found here are the logs, and information of my environment

jeanepaul@DESKTOP-T3KIFDC MINGW64 ~
$ az login
You have logged in. Now let us find all the subscriptions to which you have access...
The following tenants don't contain accessible subscriptions. Use 'az login --allow-no-subscriptions' to have tenant level access.
[
  {
    "cloudName": "AzureCloud",
    "homeTenantId": "c879b447-9284",
    "id": "86bf3679",
    "isDefault": true,
    "managedByTenants": [
      {
        "tenantId": "2f4a9838"
      }
    ],
    "name": "Microsoft Azure Sponsorship",
    "state": "Enabled",
    "tenantId": "c879b447",
    "user": {
      "name": "j.soliva",
      "type": "user"
    }
  }
]

jeanepaul@DESKTOP-T3KIFDC MINGW64 ~
$ az account list -o table
Name                         CloudName    SubscriptionId                        State    IsDefault
---------------------------  -----------  ------------------------------------  -------  -----------
Microsoft Azure Sponsorship  AzureCloud   86bf3679                              Enabled  True

jeanepaul@DESKTOP-T3KIFDC MINGW64 ~
$ docker context create aci azurecontext
no subscriptions found

$ docker version
Client: Docker Engine - Community
 Azure integration  0.1.10
 Version:           19.03.12
 API version:       1.40
 Go version:        go1.13.10
 Git commit:        48a66213fe
 Built:             Mon Jun 22 15:43:18 2020
 OS/Arch:           windows/amd64
 Experimental:      false

Thank you!

@karolz-ms
Copy link

@Hokutosei you need to do docker login azure before docker context create aci xxxx. Docker CLI does not have access to Azure CLI security tokens; it does not even require Azure CLI to be installed, they are independent.

@Hokutosei
Copy link
Author

@karolz-ms thank you for the reply. and I am sorry, I missed copying that log. I already did that, but still no luck 😔

jeanepaul@DESKTOP-T3KIFDC MINGW64 ~
$ docker login azure
login succeeded

jeanepaul@DESKTOP-T3KIFDC MINGW64 ~
$ docker context create aci azurecontext
no subscriptions found

also I tried passing the correct subscription-id

$ docker context create aci azurecontext --subscription-id 86bf3679-****
resources.GroupsClient#List: Failure responding to request: StatusCode=401 
-- Original Error: autorest/azure: Service returned an error. Status=401 Code="InvalidAuthenticationTokenTenant" Message="The access token is from the wrong issuer 'https://sts.windows.net/*****/'. 
It must match one of the tenants 'https://sts.windows.net/2f4a9838-****/,https://sts.windows.net/c879b447****/' associated with this subscription. Please use any authority (URL) from 'https://login.windows.net/2f4a9838****,https://login.windows.net/c879b447-*****' to get the token. 

Note, if the subscription is transferred to another tenant there is no impact to the services, but information about new tenant could take time to propagate (up to an hour). If you just transferred your subscription and see this error message, please try back later."

@karolz-ms
Copy link

How about passing --tenant-id to docker login azure? See #8

@Hokutosei
Copy link
Author

@karolz-ms great! that worked now :D

jeanepaul@DESKTOP-T3KIFDC MINGW64 ~
$ docker --context azurecontext ps -a
CONTAINER ID        IMAGE               COMMAND             STATUS              PORTS
agitated-lovelace   nginx                                   Running             20.195.0.***:80->80/tcp

jeanepaul@DESKTOP-T3KIFDC MINGW64 ~
$ docker context list
NAME                TYPE                DESCRIPTION                               DOCKER ENDPOINT                  KUBERNETES ENDPOINT                                                                       ORCHESTRATOR
azurecontext *      aci                 jp-research-group@southeastasia
default             moby                Current DOCKER_HOST based configuration   npipe:////./pipe/docker_engine   https://japaneast.azmk8s.io:443 (default)                                                 swarm

thank you!

@chris-crone
Copy link
Contributor

Thanks for the report @Hokutosei and @karolz-ms for helping out!

Looks like we need some documentation on this, I'll add it to our backlog

gtardif added a commit to docker-archive/compose-cli that referenced this issue Sep 16, 2020
…pt users they might need to login with -—tenant-id.

Cf docker-archive/cloud-integration-beta#27

Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
@gtardif gtardif self-assigned this Sep 16, 2020
gtardif added a commit to docker-archive/compose-cli that referenced this issue Sep 17, 2020
…pt users they might need to login with -—tenant-id.

Cf docker-archive/cloud-integration-beta#27

Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
gtardif added a commit to docker-archive/compose-cli that referenced this issue Sep 17, 2020
…pt users they might need to login with -—tenant-id.

Cf docker-archive/cloud-integration-beta#27

Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
gtardif added a commit to docker-archive/compose-cli that referenced this issue Sep 17, 2020
…pt users they might need to login with -—tenant-id.

Cf docker-archive/cloud-integration-beta#27

Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
@gtardif
Copy link
Collaborator

gtardif commented Sep 25, 2020

The error message has now been made explicit for this particular case, so you users know they can use --tenant

@gtardif gtardif closed this as completed Sep 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants