Insights Hub How to Add a New User to a Cloud Foundry Organization via the CF CLI

2024-01-10T05:51:46.000-0500
Developer Tools Applications

Summary

This knowledge article provides step-by-step instructions on how to add a new user to a Cloud Foundry (CF) organization using the Cloud Foundry Command Line Interface (CF CLI). The process involves installing the CF CLI, logging into CF, and assigning roles to the user within the organization. The article also includes optional steps for setting up proxies if behind a corporate firewall.


Details

Steps:

  1. Install Cloud Foundry Command Line Interface (CF CLI):
    Download and install the CF CLI software from https://github.com/cloudfoundry/cli
  1. Open Command Shell:
    On Windows, open the command shell using Start/Execute/cmd.
  1. Set Up Proxies (Optional):
    If behind a corporate firewall, set up proxies by entering the following two lines in the command shell:    
set http_proxy=http://coia.hcvpc.io:9400
set https_proxy=http://coia.hcvpc.io:9400
  1. Log into CF:
    Enter the following command to log into CF:    
cf login -a https://api.cf.eu1.mindsphere.io -sso

    Visit https://login.cf.eu1.mindsphere.io/passcode to obtain a One Time Code.

    Login using the WebKey Credentials.

    Copy the One Time Code and use it in the CF CLI for authentication.
  1. Add User to the Organization:
    Once logged in, the admin can add the user to the organization using the following command:
cf set-org-role EMAIL ORG OrgManager
        Replace EMAIL with the user's email address.
        Replace ORG with the organization's name.
        Instead of "OrgManager," other roles can be assigned as needed.


For more details please follow this documentation:
https://documentation.mindsphere.io/MindSphere/howto/howto-user-permissions.html#adding-the-user-to-your-cloud-foundry-org


Note:

    Ensure that the user performing these actions has the necessary privileges in Cloud Foundry.
    It's important to customize the command based on the desired role and organization.

KB Article ID# KB000128233_EN_US

Contents

SummaryDetails

Associated Components

Cloud Foundry