Obtain Tenant Information for the Access Token Request

When configuring the access token request for the REST Adapter connection for multi-tentant configurations, you will need to supply certain Unifier tenant information. This section discusses how to obtain this information.

To obtain your Unifier tenant information, you can send an HTTP header request to the Unifier authentication token endpoint using a curl command. This request will return a response that contains the Unifier tenant information you need to configure the access token request. It also contains information needed to configure lookups.

To send the HTTP header request:

  1. Run the following curl command:
    curl --location 'https://<SERVER_URL>/ws/rest/service/v2/auth/token' \
    --header 'Authorization: Basic <Base64-encoded-username-and-password>'

    Where:

    • <SERVER_URL> is the base URL of your Primavera Unifier environment, including your region (if there is one), host server, your specific company code. For example:

      https://<region>.unifier.oraclecloud.com/<companycode>

    • <Base64-encoded-username-and-password> is the Base64 encoded version of your Primavera Unifier user name and password.

      For information about how to obtain this, see Generate a Base64 Encoded User Name and Password.

  2. This generates a response that looks like this:
    {
        "data": {
            "endpoint": "<endpoint>",
            "access_token": "<access_token>",
            "expires_in": xxxx,
            "request_headers": {
                "x-unifier-tenant-code": "<tenant-code>",
                "x-unifier-tenant": "<tenant>"
            }
        },
            "message": [],
            "status": 200
    }
  3. From the response above, copy the following values:
    1. Copy the values for <tenant-code> and <tenant> and add them to the access token request. Specifically, replace the <Tenant-Code> variable in the access token request example with the value for <tenant-code> from the response above, and replace the <MultiTenantHeader> variable in the access token request example with the value for <tenant> from the response above.
    2. Copy the values for <endpoint>, <access token>, <tenant-code>, and <tenant> and add those values to the corresponding lookups in the delivered lookup table.

      For details, see Configure Lookups