Using a service account to get users - Cloud

Talend Cloud APIs User Guide

Talend Cloud
Talend API Designer
Talend API Tester
Talend Data Preparation
Talend Data Stewardship
Talend Management Console
Design and Development > Designing APIs
Design and Development > Testing APIs
Last publication date

Use the service account and its token you created in previous sections to get users under your tenant.

The API to be used is https://api.<env>

Before you begin

  • Ensure that the service account to be used to issue API calls has the Users - Manage permission. The ID of this permission is TMC_USER_MANAGEMENT.

About this task

In this section, the following API call is issued:
method: GET
endpoint: https://api.<env>
headers: {
 "Authorization": "Bearer <service_account_token>"
payload: N/A
It is implemented in Talend API Tester for demonstration purposes. In Talend API Tester, you can use an expression builder to dynamically retrieve the service account token from its related API request.


  1. Select GET from the Method list and in the field aside, enter the user management endpoint to be used: https://api.<env>


    The GET method is selected and the user management endpoint to be used is specified.
  2. Click Add header and in the name field that is displayed, enter Authorization and in the value field, enter Bearer and service account access token in plain text or click the to build a dynamic expression. Enter a whitespace to separate Bearer and the token.


    Since you need to renew the token once the current one expires, it is recommended to use an expression to enable this API request to dynamically use the latest token once it is renewed by the token API request.
    The Expression Builder.

    On Talend API Tester, you can use the expression builder to write the expression. Note that the token API request must have been saved in your repository. In the previous section, this API request was saved and named as Renew the SAT.

    This makes the value of Authorization look like this.
    Bearer ${"service-account 2021"."Service Account Token scenario"."Reniew the SAT"."response"."body"."access_token"}
  3. Send and save the request.


A user list is returned with the status code 200.