## 3.2.2.1 Setting Up a Global Account via the Command Line
Your global account is the entry point for managing the resources, landscape, and entitlements for your departments and projects in a self-service manner in SAP BTP. You can use the command-line tool btp CLI to set it up, and the cf CLI to manage Cloud Foundry instances.
Set up your account model using the btp CLI by creating subaccounts in your enterprise account. You can create any number of subaccounts in the Cloud Foundry environment and region.
To manage Cloud Foundry, i.e. for managing service instances and members in orgs and spaces, creating spaces, as well as assigning quota to orgs and spaces, you use the cf CLI.
## Prerequisites
- You have purchased an enterprise global account.
- You have downloaded and extracted the following command-line tools:
- SAP BTP command line interface (btp CLI). See Download and Start Using the btp CLI Client [page 2402]
- Cloud Foundry CLI (cf CLI). See Download and Install the Cloud Foundry Command Line Interface [page 2533]
## Procedure
 Tip
In the btp CLI, you can view the command help of each command to get information about how to use the command, its syntax, and input parameters. See Get Help [page 2415].
|   Step No. | Task                                                                                                          | Per- formed By                               | Do This                                    | More Information        |
|------------|---------------------------------------------------------------------------------------------------------------|----------------------------------------------|--------------------------------------------|-------------------------|
|          1 | Log in to your global account us- ing the URL of the btp CLI server and the subdomain of your global account. | Global ac- count ad- ministra- tor or viewer | Run this command in the btp CLI: btp login | See Log in [page 2416]. |
|   Step No. | Task                                                                                | Per- formed By                     | Do This                                                                                                                                                                                                                           | More Information                                                                                                                                                  |
|------------|-------------------------------------------------------------------------------------|------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|          2 | View details of your global account.                                                | Global ac- count ad- min or viewer | Run this command in the btp CLI: btp get accounts/global- account                                                                                                                                                                 | See Working with Global Accounts, Di- rectories, and Subac- counts Using the btp CLI [page 2434].                                                                 |
|          3 | Add admins to your global account.                                                  | Global ac- count ad- min           | Assign the role collection Global Account Administrator to a user by running the following command in the btp CLI: btp assign security/role- collection "Global Account Administrator" --to-user <user> --create-user-if- missing | See Managing Users and Their Authori- zations Using the btp CLI [page 2445] and Security Admin- istration: Managing Authentication and Authorization [page 2278]. |
|          4 | View all the regions that are availa- ble to your global account and sub- accounts. | Global ac- count ad- min or viewer | Run this command in the btp CLI: btp list accounts/ available-region                                                                                                                                                              | This command also provides information about the environ- ments and infrastruc- ture provider of each region.                                                     |
|          5 | Create subaccounts in your global account.                                          | Global ac- count ad- min           | Run this command in the btp CLI: btp create accounts/ subaccount --display-name <my-subaccount> --region <my-region> --subdomain <my-subaccount-subdomain>                                                                        | See Working with Global Accounts, Di- rectories, and Subac- counts Using the btp CLI [page 2434].                                                                 |
|          6 | View the details of the subaccounts in your global account.                         | Global ac- count ad- min or viewer | Run this command in the btp CLI: btp get accounts/ subaccount <ID of new subaccount>                                                                                                                                              | See Working with Global Accounts, Di- rectories, and Subac- counts Using the btp CLI [page 2434].                                                                 |
|          7 | Add admins to your subaccounts.                                                     | Subac- count ad- min               | Assign the role collection Subaccount Administrator to the user by running the following com- mand in the btp CLI: btp assign security/role- collection "Subaccount Administrator" --to-user <user> --create-user-if- missing     | See Managing Users and Their Authori- zations Using the btp CLI [page 2445] and Security Admin- istration: Managing Authentication and Authorization [page 2278]. |
|   Step No. | Task                                                                                                                               | Per- formed By                     | Do This                                                                                                                                                                                                                                  | More Information                                                                                                                                  |
|------------|------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|
|          8 | View all the services and applica- tions that are entitled to your global account, including quota informa- tion per service plan. | Global ac- count ad- min or viewer | Run this command in the btp CLI: btp list accounts/ entitlement                                                                                                                                                                          | See Setting Entitle- ments Using the btp CLI [page 2438].                                                                                         |
|          9 | Assign quotas to your subaccounts.                                                                                                 | Global ac- count ad- min           | Run this command in the btp CLI: btp assign accounts/entitlement --to- subaccount <my-subaccount- id> --for-service <my- service> --plan <my- service-plan> --amount <number> Validate with this command: btp list accounts/ entitlement | See Setting Entitle- ments Using the btp CLI [page 2438].                                                                                         |
|         10 | View all the entitlements in your subaccounts.                                                                                     | Subac- count ad- min or viewer     | Run this command in the btp CLI: btp list accounts/ entitlement --subaccount <my-subaccount-id>                                                                                                                                          | See Setting Entitle- ments Using the btp CLI [page 2438].                                                                                         |
|         11 | Create a Cloud Foundry org (envi- ronment instance) in your subac- counts.                                                         | Subac- count ad- min               | Run this command in the btp CLI: btp create accounts/ environment-instance -- subaccount <my-subaccount- id> --display-name <my- environment> --environment <cloudfoundry> --plan standard --parameters "{\"instance_name\":\"myOr g\"}" | See Working with En- vironments Using the btp CLI [page 2439] andOrg Management Using the SAP BTP CommandLine Inter- face (btp CLI) [page 2502] . |
|         12 | View details of the environment in- stances in your subaccounts.                                                                   | Subac- count ad- min or viewer     | Run this command in the btp CLI: btp list accounts/ environment-instance -- subaccount <my-subaccount- id>                                                                                                                               | See Working with En- vironments Using the btp CLI [page 2439].                                                                                    |
|         13 | Create a Cloud Foundry space.                                                                                                      | Org man- ager                      | Run these cf CLI commands: cf login cf create-space                                                                                                                                                                                      | See Create Spaces Using the Cloud Foun- dry CommandLine In- terface [page 2572].                                                                  |
|   Step No. | Task                                                             | Per- formed By   | Do This                                                                                                            | More Information                                                                                                                                                               |
|------------|------------------------------------------------------------------|------------------|--------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|         14 | Add Cloud Foundry org and space members.                         | Org man- ager    | Run these cf CLI commands: cf set-org-role <USERNAME> <ORG> <ROLE> cf set-space-role <USERNAME><ORG><SPACE><ROL E> | See Add Organization Members Using the Cloud Foundry Com- mand Line Interface [page 2571] and Add Space Members Us- ing the Cloud Foundry CommandLine Inter- face [page 2573]. |
|         15 | Display all available services in the Cloud Foundry marketplace. | Org man- ager    | Run this cf CLI command: cf marketplace                                                                            | See Using Services in the Cloud Foundry Environment [page 252].                                                                                                                |
Using the btp CLI, you can perform additional account maintenance tasks, such as updating global account and subaccount details, deleting subaccounts, and deleting environment instances.
Subaccount members can also use the btp CLI to work with multitenant applications. See Working with Multitenant Applications Using the btp CLI [page 2440].
## Next Steps
Org/space members can create service instances, which are entitled to the subaccount, using also the cf create-service &lt;allowed-service-plan&gt; command in the cf CLI. Use the cf CLI command cf services to verify that the service instances exist.
For further documentation about developer tasks, see Development in the Cloud Foundry Environment [page 237].
## Related Information
Command Syntax of the btp CLI [page 2408]
Download and Start Using the btp CLI Client [page 2402] btp CLI Command Reference