2
votes

I'm completely stumped with this issue I'm having logging in using ibmcloud CLI.

So, I created an IBM Cloud account using account-01. I created an Organisation and a space and then created a Cloud Foundry Application within it. Using account-01, I can login using "ibmcloud login" and can set the target using "ibmcloud target --cf".

Now, I invited another user - account-01 the organisation and I gave them Manager access to the Organisation and Developer access to the Space. They can login using the website and can see the Cloud Foundry Application when they switch to my account.

Using ibmcloud CLI; they can login; but they can't set the target. Since they can't set the target; they then can't connect to the apps to deploy new versions, see logs, etc.

The error message is not making much sense to me at all. The steps are below:

C:\Users\admin>ibmcloud login
API endpoint: https://cloud.ibm.com
Region: au-syd

Email> [email protected]

Password>
Authenticating...
OK

Select an account:
1. Account-01's Account (yyyy) <-> 1234324
2. Account-03's Account (xxxxx) <-> 2234325
Enter a number> 1
Targeted account Account-01's Account (yyyy) <-> 1234324


API endpoint:      https://cloud.ibm.com
Region:            au-syd
User:              [email protected]
Account:           Account-01's Account (yyyy) <-> 1234324
Resource group:    No resource group targeted, use 'ibmcloud target -g RESOURCE_GROUP'
CF API endpoint:
Org:
Space:

C:\Users\admin>ibmcloud target --cf
FAILED
Could not login to Cloud Foundry: Remote server error. Status code: 403, error code: forbidden, message: BMXLS0201E: No such account

Why is this user not able to login? Are there some other permissions missing that I haven't set somewhere.

1
Can they set the org and space without interaction (using -o and -s)? Is the user connecting to the right region and endpoint? - data_henrik
No. Get the same error message with trying -o or -s or even trying to set the endpoint. - Vivek Mittal

1 Answers

2
votes

I got the Group - by going to "Manage -> Account -> Resource Groups" in the left navigation panel. It was "Default". So I added it as shown.

$ ibmcloud target -g Default
Targeted resource group Default



API endpoint:      https://cloud.ibm.com   
Region:            us-south   
User:              [email protected]   
Account:           xyz (abcd)   
Resource group:    Default   
CF API endpoint:   https://api.us-south.cf.cloud.ibm.com (API version: 2.147.0)   
Org:                  
Space:                

Tip: If you are managing Cloud Foundry applications and services
- Use 'ibmcloud target --cf' to target Cloud Foundry org/space interactively, or use 'ibmcloud target --cf-api ENDPOINT -o ORG -s SPACE' to target the org/space.
- Use 'ibmcloud cf' if you want to run the Cloud Foundry CLI with current IBM Cloud CLI context