> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/s/sap-concur.md).

# SAP Concur

SAP Concur is a travel and expense platform. OctoXLabs reads the user profiles of your company from the Identity v4 API and adds them to the user inventory.

## Use cases

* List SAP Concur users.

```
Adapters = sap-concur
```

* Find Concur users who are not in your directory.

```
Adapters = sap-concur AND NOT Adapters = active-directory
```

## Before you begin

### Network

| Source              | Destination                                                                         | Port | Protocol |
| ------------------- | ----------------------------------------------------------------------------------- | ---- | -------- |
| OctoXLabs connector | .api.concursolutions.com (token), then the geolocation host returned with the token | 443  | HTTPS    |

### Required permissions

| Scope or role                            | Permission | Needed for                   |
| ---------------------------------------- | ---------- | ---------------------------- |
| Read access to Identity v4 user profiles | Read       | `/profile/identity/v4/Users` |

The Identity v4 API accepts only company level access tokens.

## Create credentials in SAP Concur

{% stepper %}
{% step %}

### Create a Company Request Token

Generate a **Company Request Token** for your application with the Company Request Token Tool in SAP Concur. Note the **Company UUID** and the **Request Token**.
{% endstep %}

{% step %}

### Exchange it for a refresh token

Send a password grant request to `https://glz.api.concursolutions.com/oauth2/v0/token` with form fields `client_id`, `client_secret`, `grant_type=password`, `credtype=authtoken`, `username=<Company UUID>` and `password=<Company Request Token>`.
{% endstep %}

{% step %}

### Copy the refresh token

Enter the `refresh_token` from the response in the Refresh Token field. Enter the region of the `geolocation` value (for example <https://us2.api.concursolutions.com> means us2) in the Region field.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter     | Required | Type    | Default | Description                                                                                                                                                                    |
| ------------- | -------- | ------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Region        | No       | String  | glz     | Data center region. Values: glz (Global Landing Zone), us2 (US), eu2 (EU), apj1 (APJ), usg (US Government). Use the region of the geolocation returned with the refresh token. |
| Client ID     | Yes      | String  | None    | Client ID of the SAP Concur application.                                                                                                                                       |
| Client Secret | Yes      | String  | None    | Client secret of the same application.                                                                                                                                         |
| Refresh Token | Yes      | String  | None    | Valid for 6 months. SAP Concur may issue a new one when it is used. If authentication starts to fail, repeat the steps and update the field.                                   |
| Per Page      | No       | Integer | 100     | Users per page. Min 1, max 100.                                                                                                                                                |
| Proxy         | No       | String  | None    | Proxy as host:port. The connector prefixes it with http\://.                                                                                                                   |
| Timeout       | No       | Integer | 30      | Seconds to wait for API responses.                                                                                                                                             |

## Troubleshooting

| Error message | Cause                                                                                                                                      | Fix                                                                                                                          |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| Status Code:  | The API answered with a status other than the one the connector expects. The message also lists the URL, the method and the response body. | Read the status code and the response body in the message, then check the credentials, the permissions and the network path. |

## Change history

{% hint style="info" %}
Available starting from version 6.9.1.
{% endhint %}
