Managing users
The Users API lets you manage users and control their access to assets, applications, and reports within a Stonal organization. It is aimed at developers who need to provision users programmatically — creating accounts, assigning permissions, and keeping user records in sync with an external directory.
How access works
Access is governed by two complementary mechanisms: user groups, which bundle a set of permissions and can be assigned to many users at once, and permissions, which attach profiles, application scopes, and asset rights directly to individual users. Both are described in detail on the Understanding access page.
The typical journey
- Authenticating users — obtain and manage access tokens for API calls on behalf of a user.
- Understanding access — learn how groups, profiles, application groups, and asset permissions interact.
- Look up groups & permissions — query the available groups and permission values in your organization.
- Create or update a user — provision a new user or update an existing one.
- Disable or delete a user — temporarily suspend a user's access (reversible) or permanently remove them.
- Resynchronize users — keep user records in sync after bulk changes.
Prerequisites
Before using the Users API you need:
- A valid set of API credentials (client ID and client secret).
- A valid access token — see Get a token.
- Your organization code.
Understanding access
A user's access is granted through exactly two mechanisms — user groups (userGroupUids) and permissions (permissions[].uid). Everything else — profiles, application groups, assets, report groups — is not a separate concept; it's just a permission with a different type/subType.
Authenticating users
At Stonal, we use a dedicated service for identity management.
Set up identity delegation
Identity delegation lets a customer's users authenticate through their own identity provider (OIDC). This is a one-time setup per organization.
Look up groups & permissions
Creating, updating, and deleting users all start by looking up the UIDs you'll reference. This page is the single reference for those lookups.
Create or update a user
Creating and updating a user are the same operation and share the same UpsertUserRequest body. POST …/users creates the user — or updates them if the email already exists. PUT …/users/ updates a known user by UID. Both return 200.
Disabling or deleting a user
This guide covers the two ways to end a user's access to an organization with the API:
Legacy V1
4 items
Resynchronizing users
Resync compares your source of truth against Stonal and applies create/update/delete per user.