Managing Global Roles via the Command Line
You can use the datasphere command line interface to list global roles and the users assigned to them and to add users to and remove users from them.
Prerequisites
-
Data Warehouse General (-R------) - To access SAP Datasphere.
-
Role (CRUD----) - To access the (Roles) and (Authorization Overview) areas in the (Security) tool and to create, update, and delete roles.
-
User (-------M) - To add users to roles.
-
Install the datasphere command line interface (see Install or Update the SAP Datasphere Command Line Interface).
-
Log in to your SAP Datasphere tenant (see Log into the Command Line Interface via an OAuth Client).
datasphere global-roles
For general information about working with global roles in SAP Datasphere , see Assign Users to a Role.
List Global Roles
You can list the global roles in your tenant, and optionally write them to a file.
datasphere global-roles list
[--output <file>.json]
|
Parameter |
Description |
|---|---|
|
--output <file>.json |
[optional] Enter a path to a .json file to write the output to. If you do not include this option, the output will be printed to the command line. |
List Users in a Global Role
datasphere global-roles users list
--role <ID>
--output <file>.json
|
Parameter |
Description |
|---|---|
|
--role <id> |
Enter the ID of a global role. |
|
--output <file>.json |
[optional] Enter a path to a .json file to write the output to. If you do not include this option, the output will be printed to the command line. |
datasphere global-roles users list --role Custom_Administrator --output admins.json
Add Users to Global Roles
You can add users to a global role.
datasphere global-roles users add
--role <ID>
--users <userID[,userID...]>
|
Parameter |
Description |
|---|---|
|
--role <id> |
Enter the ID of a global role. |
|
--users <userID[,userID...]> |
Enter a comma-separated list of user IDs. |
datasphere global-roles users add --role Custom_Administrator --users AADAMS,SSMITH
Remove Users from Global Roles
You can remove users from a global role.
datasphere global-roles users remove
--role <ID>
--users <userID[,userID...]>
|
Parameter |
Description |
|---|---|
|
--role <id> |
Enter the ID of a global role. |
|
--users <userID[,userID...]> |
Enter a comma-separated list of user IDs. |
datasphere global-roles users remove --role Custom_Administrator --users AADAMS,SSMITH