How to create a new active user for CLM and eSignature
This topic demonstrates how to use the Docusign Admin API to create a new CLM and eSignature user and activate their account automatically. Auto-activating a user’s account membership bypasses the activation email and password setup process, which is particularly useful for integrations and customers using single sign-on (SSO).
The auto-activate option is only available for users with an email address domain that has been claimed by your organization.
Run this code example from our Quickstart or launcher projects: Bash, C#, Java, Node.js, PHP, PowerShell, Python, or Ruby.
Required data
Running the code in this how-to requires this data:
Step 1. Obtain your OAuth token
To make the API calls shown in this how-to, you need a valid OAuth access token. Docusign supports access tokens for three different recommended OAuth grant types: Public Authorization Code Grant, Confidential Authorization Code Grant, and JSON Web Token (JWT) Grant. Choose the OAuth grant type appropriate for your scenario.
Docusign Admin OAuth access tokens are the same ones used for our eSignature REST API, although you must request one or more Docusign Admin scopes to call the Docusign Admin API. The endpoint calls made in this how-to require that you request the Docusign Admin-specific user_write scope when obtaining your access token.
See Docusign Admin Authentication for details and the full list of Docusign Admin scopes.
Step 2. Construct your API headers
After you have a valid OAuth access token, you are ready to construct the API headers that you will pass to the API call. Construct your headers like this, but make sure to substitute your valid OAuth access token for {ACCESS_TOKEN}.
Step 3. Retrieve CLM and eSignature permission profiles
Make a GET request to obtain a single list containing the eSignature product ID and permission profile IDs and the CLM product ID and permission profile IDs. Here’s how you make the call, but make sure to substitute your base path for {BASE_PATH}, your API account ID for {API_ACCOUNT_ID}, and your organization ID for {ORGANIZATION_ID}. Select one of the returned eSignature permission profile IDs and one of the returned CLM permission profile IDs.
Step 4. Select a Docusign Admin group ID
To find the Docusign Admin group to which you want to assign the user, you need to make a GET request to obtain a list of all available Docusign Admin group IDs. Select a group ID to continue through the example. Here’s how you make the call, but make sure to substitute your base path for {BASE_PATH}, your API account ID for {API_ACCOUNT_ID}, and your organization ID for {ORGANIZATION_ID}.
Step 5. Construct the request body
Next, construct the request body. This contains the details of the user account to be created and an optional parameter, auto_activate_memberships, that automatically enables the account if set to true. You must also include the Docusign Admin group ID and permission profile information obtained previously.
Your organization’s domain must have the Require all users to authenticate with Identity Provider option enabled to use the auto_activate_memberships parameter.
Step 6. Call the Docusign Admin API
Now that you have constructed your API headers and request body, make a POST request to the MultiProductUserManagement: addOrUpdateUser endpoint and include the request body to create the user for your organization. Here’s how you make the call, but make sure to substitute your base path for {BASE_PATH}, your API account ID for {API_ACCOUNT_ID}, and your organization ID for {ORGANIZATION_ID}.
Expected response
If you run this code example from our Quickstart or launcher projects, you should see a JSON response similar to the code shown.
Next steps
- Run this code example from our Quickstart or launcher projects: Bash, C#, Java, Node.js, PHP, PowerShell, Python, or Ruby.
- Learn How to audit users.
- Learn more about the new Admin API v2.1.
- See how to Go-Live with a completed app and find the base path for API calls in the production environment.