I targeted organization and space using this command target -o xxxxx@gmail.com -s spaceName
and it targeted successfully
But when I run IBMCloud fn list
, it is showing A target org and name must be specified

- 16,724
- 2
- 28
- 49

- 120
- 5
1 Answers
I assume that you targeted the organization and space using ibmcloud target ...
. See here the documentation for IBM Cloud Functions on targeting a namespace. Functions have their own system of namespaces. Initially, they mapped to Cloud Foundry organization and spaces, then moved to IAM-enabled namespaces.
You can list your IAM-enabled namespaces using this command:
ibmcloud fn namespace list
Thereafter, set the namespace like this:
ibmcloud fn namespace target HenriksNamespaceOne
Now you can list the objects in that namespace:
ibmcloud fn list
I strongly recommend to only use IAM-enabled namespaces because they allow better security control. In case of an issue, you could use the following command to see what Functions environment is set:
ibmcloud fn property get
Thereafter, use ibmcloud fn property unset --namespace
to unset the namespace property. Then, run ibmcloud target -o ORG -s SPACE
to target the CF-based namespace. You can also run ibmcloud target --cf
to interactively target it.

- 16,724
- 2
- 28
- 49
-
When I run this command ''''ibmcloud fn namespace target xxxxxx'''' , It is showing is a CF-based namespace and cannot be targeted – Vinayak Moger Sep 30 '20 at 04:18
-
What does `ibmcloud fn namespace list` return? That command only lists the IAM namespaces. Do you have objects in a CF-based namespace? If not, start with IAM and create via `ibmcloud fn namespace create yournamespace` – data_henrik Sep 30 '20 at 04:52
-
idmcloud fn namespace list returns the list of namespaces and I have CF-based namespace. Cannot run fn list commands, even though targeted org and space – Vinayak Moger Sep 30 '20 at 07:23
-
Ok, I added more details on how to unset the current IAM namespace property and set a CF namespace. Let me know if that works – data_henrik Sep 30 '20 at 07:32