Obtain Tenant Information for the Access Token Request

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

To obtain your Primavera Unifier tenant information, you can send an HTTP header request to the Primavera Unifier authentication token endpoint using a curl command. This request will return a response that contains the Primavera 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 instance, including your region (if applicable), host server, and your specific company code (for example: <region>.unifier.oraclecloud.com/<companycode>).

    • <Base64-encoded-username-and-password> is the encoded username and password value of your Primavera Unifier integration user. See Prepare Base64-Encoded Credentials.

  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