Pragmatism in the real world

Adding a user to your Bluemix space

I’m at the stage where I need to give another developer access to my IBM Cloud Functions actions. I’m not really an infrastructure person and I found the user management pages on the Bluemix console incomprehensible, so used the command line. This is how I did it so that I don’t have to work it all out again.

Add the user to your organisation

These are the steps to add the user to your organisation:

  1. Register the new user with Bluemix. In my case, this is
  2. Invite the user into your organisation with bx iam org-user-add {username} {organisation name}. I’m adding this user to my 19FT organisation, so for me this is:
    $ bx iam org-user-add 19FT

The user can now access the organisation, but can’t access a space. If they log in you get a very scary message about there being no spaces in this organisation. This is wrong, what it actually means is that this user doesn’t have access to any of the spaces that exist.

Add the user to a space

Spaces are per region, so you first need to ensure that your bx is working in the right region:

  1. Run bx target to check which region you’re currently logged into.
  2. If you’re in the wrong region, change using bx target -r {region name} --cf. You can find the correct region name to use with bx regions which list them for you. For today, I need:
    $ bx target eu-gb --cf

Now that I’m the right region, I add the user using bx iam space-role-set {username} {organisation name} {role name}. To find the list of available role names, use bx iam space-role-set -h. In my case I want the SpaceDeveloper role as my new user needs to edit and update OpenWhisk actions:

$ bx iam space-role-set 19FT dev SpaceDeveloper

Repeat for all the spaces that this user needs access to. If they also need access to spaces in a different region, swap regions with bx target and repeat again.

Usefully, the user also gets access to the other services, such as any Cloudant databases that are attached to that space with no additional work required.

One thought on “Adding a user to your Bluemix space

Comments are closed.