Manage users, groups, and roles with SCIM
14 minute read
The System for Cross-domain Identity Management (SCIM) API allows instance or organization admins to manage users, groups, and custom roles in their W&B organization. SCIM groups map to W&B teams.
The SCIM API is accessible at <host-url>/scim/
and supports the /Users
and /Groups
endpoints with a subset of the fields found in the RC7643 protocol. It additionally includes the /Roles
endpoints which are not part of the official SCIM schema. W&B adds the /Roles
endpoints to support automated management of custom roles in W&B organizations.
If you are an admin of multiple Enterprise SaaS Cloud organizations, you must configure the organization where SCIM API requests are sent. Click your profile image, then click User Settings. The setting is named Default API organization. This is required for all hosting options, including Dedicated Cloud, Self-managed instances, and SaaS Cloud. In SaaS Cloud, the organization admin must configure the default organization in user settings to ensure that the SCIM API requests go to the right organization.
The chosen hosting option determines the value for the <host-url>
placeholder used in the examples in this page.
In addition, examples use user IDs such as abc
and def
. Real requests and responses have hashed values for user IDs.
Authentication
An organization or instance admin can use basic authentication with their API key to access the SCIM API. Set the HTTP request’s Authorization
header to the string Basic
followed by a space, then the base-64 encoded string in the format username:API-KEY
. In other words, replace the username and API key with your values separated with a :
character, then base-64-encode the result. For example, to authorize as demo:p@55w0rd
, the header should be Authorization: Basic ZGVtbzpwQDU1dzByZA==
.
User resource
The SCIM user resource maps to W&B users.
Get user
- Endpoint:
<host-url>/scim/Users/{id}
- Method: GET
- Description: Retrieve the information for a specific user in your SaaS Cloud organization or your Dedicated Cloud or Self-managed instance by providing the user’s unique ID.
- Request Example:
- Response Example:
List users
- Endpoint:
<host-url>/scim/Users
- Method: GET
- Description: Retrieve the list of all users in your SaaS Cloud organization or your Dedicated Cloud or Self-managed instance.
- Request Example:
- Response Example:
Create user
- Endpoint:
<host-url>/scim/Users
- Method: POST
- Description: Create a new user resource.
- Supported Fields:
Field | Type | Required |
---|---|---|
emails | Multi-Valued Array | Yes (Make sure primary email is set) |
userName | String | Yes |
- Request Example:
- Response Example:
Delete user
- Endpoint:
<host-url>/scim/Users/{id}
- Method: DELETE
- Description: Fully delete a user from your SaaS Cloud organization or your Dedicated Cloud or Self-managed instance by providing the user’s unique ID. Use the Create user API to add the user again to the organization or instance if needed.
- Request Example:
PATCH
endpoint.- Response Example:
Deactivate user
- Endpoint:
<host-url>/scim/Users/{id}
- Method: PATCH
- Description: Temporarily deactivate a user in your Dedicated Cloud or Self-managed instance by providing the user’s unique ID. Use the Reactivate user API to reactivate the user when needed.
- Supported Fields:
Field | Type | Required |
---|---|---|
op | String | Type of operation. The only allowed value is replace . |
value | Object | Object {"active": false} indicating that the user should be deactivated. |
- Request Example:
- Response Example: This returns the User object.
Reactivate user
- Endpoint:
<host-url>/scim/Users/{id}
- Method: PATCH
- Description: Reactivate a deactivated user in your Dedicated Cloud or Self-managed instance by providing the user’s unique ID.
- Supported Fields:
Field | Type | Required |
---|---|---|
op | String | Type of operation. The only allowed value is replace . |
value | Object | Object {"active": true} indicating that the user should be reactivated. |
- Request Example:
- Response Example: This returns the User object.
Assign organization-level role to user
- Endpoint:
<host-url>/scim/Users/{id}
- Method: PATCH
- Description: Assign an organization-level role to a user. The role can be one of
admin
,viewer
ormember
as described here. For SaaS Cloud, ensure that you have configured the correct organization for SCIM API in user settings. - Supported Fields:
Field | Type | Required |
---|---|---|
op | String | Type of operation. The only allowed value is replace . |
path | String | The scope at which role assignment operation takes effect. The only allowed value is organizationRole . |
value | String | The predefined organization-level role to assign to the user. It can be one of admin , viewer or member . This field is case insensitive for predefined roles. |
- Request Example:
- Response Example: This returns the User object.
Assign team-level role to user
- Endpoint:
<host-url>/scim/Users/{id}
- Method: PATCH
- Description: Assign a team-level role to a user. The role can be one of
admin
,viewer
,member
or a custom role as described here. For SaaS Cloud, ensure that you have configured the correct organization for SCIM API in user settings. - Supported Fields:
Field | Type | Required |
---|---|---|
op | String | Type of operation. The only allowed value is replace . |
path | String | The scope at which role assignment operation takes effect. The only allowed value is teamRoles . |
value | Object array | A one-object array where the object consists of teamName and roleName attributes. The teamName is the name of the team where the user holds the role, and roleName can be one of admin , viewer , member or a custom role. This field is case insensitive for predefined roles and case sensitive for custom roles. |
- Request Example:
- Response Example: This returns the User object.
Group resource
The SCIM group resource maps to W&B teams, that is, when you create a SCIM group in a W&B deployment, it creates a W&B team. Same applies to other group endpoints.
Get team
- Endpoint:
<host-url>/scim/Groups/{id}
- Method: GET
- Description: Retrieve team information by providing the team’s unique ID.
- Request Example:
- Response Example:
List teams
- Endpoint:
<host-url>/scim/Groups
- Method: GET
- Description: Retrieve a list of teams.
- Request Example:
- Response Example:
Create team
- Endpoint:
<host-url>/scim/Groups
- Method: POST
- Description: Create a new team resource.
- Supported Fields:
Field | Type | Required |
---|---|---|
displayName | String | Yes |
members | Multi-Valued Array | Yes (value sub-field is required and maps to a user ID) |
- Request Example:
Creating a team called wandb-support
with dev-user2
as its member.
- Response Example:
Update team
- Endpoint:
<host-url>/scim/Groups/{id}
- Method: PATCH
- Description: Update an existing team’s membership list.
- Supported Operations:
add
member,remove
member - Request Example:
Adding dev-user2
to wandb-devs
- Response Example:
Delete team
- Deleting teams is currently unsupported by the SCIM API since there is additional data linked to teams. Delete teams from the app to confirm you want everything deleted.
Role resource
The SCIM role resource maps to W&B custom roles. As mentioned earlier, the /Roles
endpoints are not part of the official SCIM schema, W&B adds /Roles
endpoints to support automated management of custom roles in W&B organizations.
Get custom role
- Endpoint:
<host-url>/scim/Roles/{id}
- Method: GET
- Description: Retrieve information for a custom role by providing the role’s unique ID.
- Request Example:
- Response Example:
List custom roles
- Endpoint:
<host-url>/scim/Roles
- Method: GET
- Description: Retrieve information for all custom roles in the W&B organization
- Request Example:
- Response Example:
Create custom role
- Endpoint:
<host-url>/scim/Roles
- Method: POST
- Description: Create a new custom role in the W&B organization.
- Supported Fields:
Field | Type | Required |
---|---|---|
name | String | Name of the custom role |
description | String | Description of the custom role |
permissions | Object array | Array of permission objects where each object includes a name string field that has value of the form w&bobject:operation . For example, a permission object for delete operation on W&B runs would have name as run:delete . |
inheritedFrom | String | The predefined role which the custom role would inherit from. It can either be member or viewer . |
- Request Example:
- Response Example:
Delete custom role
- Endpoint:
<host-url>/scim/Roles/{id}
- Method: DELETE
- Description: Delete a custom role in the W&B organization. Use it with caution. The predefined role from which the custom role inherited is now assigned to all users that were assigned the custom role before the operation.
- Request Example:
- Response Example:
Update custom role permissions
- Endpoint:
<host-url>/scim/Roles/{id}
- Method: PATCH
- Description: Add or remove custom permissions in a custom role in the W&B organization.
- Supported Fields:
Field | Type | Required |
---|---|---|
operations | Object array | Array of operation objects |
op | String | Type of operation within the operation object. It can either be add or remove . |
path | String | Static field in the operation object. Only value allowed is permissions . |
value | Object array | Array of permission objects where each object includes a name string field that has value of the form w&bobject:operation . For example, a permission object for delete operation on W&B runs would have name as run:delete . |
- Request Example:
- Response Example:
Update custom role metadata
- Endpoint:
<host-url>/scim/Roles/{id}
- Method: PUT
- Description: Update the name, description or inherited role for a custom role in the W&B organization. This operation doesn’t affect any of the existing, that is, non-inherited custom permissions in the custom role.
- Supported Fields:
Field | Type | Required |
---|---|---|
name | String | Name of the custom role |
description | String | Description of the custom role |
inheritedFrom | String | The predefined role which the custom role inherits from. It can either be member or viewer . |
- Request Example:
- Response Example:
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.