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 I 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 Organization

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

Register the new user with Bluemix. In my case, this is test@19ft.com.

Invite the user into your organization with bx iam org-user-add {username} {organization name}. I'm adding this user to my 19FT organization, so for me, this is:

$ bx iam org-user-add test@19ft.com 19FT

The user can now access the organization but can't access a space. If they log in, you get a very scary message about there being no spaces in this organization. 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:

Run bx target to check which region you're currently logged into.

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 in the right region, I add the user using bx iam space-role-set {username} {organization 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 test@19ft.com 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.