Create OAuth tokens for user management APIs in One ID
Learn how to create an OAuth 2.0 client using the client credentials grant type in the OneID portal.
-
You have an administrator role in OneID with permission to manage OAuth 2.0 clients.
-
You have identified the scope (for example, organization-level access) that your integration requires.
-
You have a secure location, such as a secrets manager, in which to store the generated client secret.
To automate user and organization management tasks, OneID exposes a set of SCIM 2.0-based user management APIs. These APIs are protected by OAuth 2.0 and require a bearer access token in every request. To obtain an access token, you must first create an OAuth 2.0 client in the OneID portal by using the client credentials grant type. This grant type is intended for server-to-server (machine-to-machine) integrations where no end user is involved, such as provisioning users from your HR system or synchronizing organization membership from an external directory.
When you create the client, OneID issues a client ID and a client secret. Your application exchanges these credentials at the OneID token endpoint for a short-lived access token, which it then includes in the Authorization: Bearer <token> header when calling the user management APIs. The scope you select on the client (for example, Organization) determines which resources the resulting token can access.
You can now use the client ID and client secret to request an OAuth 2.0 access token from the OneID token endpoint, and then include that token in the Authorization header when you call the OneID user management APIs. For details about token requests and supported API endpoints, see the OneID API reference.