> 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-3.x.md).

# SAP Concur 3.x

This adapter reads users from the SAP Concur v3.0 Users API. SAP Concur has deprecated that API. Use the SAP Concur adapter (Identity v4) when it is available for your company.

## Use cases

* List SAP Concur users from the v3.0 API.

```
Adapters = sap-concur-3x
```

## 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 the v3.0 Users API; a role that allows listing all users | Read       | `/api/v3.0/common/users` |

## Create credentials in SAP Concur 3.x

{% 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.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter     | Required | Type    | Default | Description                                                                                                                                                       |
| ------------- | -------- | ------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Region        | No       | String  | glz     | Data center region. Values: glz, us2, eu2, apj1, usg (CCPS), us-impl and emea-impl (sandboxes). Full list: <https://developer.concur.com/platform/base-uris.html> |
| 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.                      |
| 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                                                                                                                          |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| Max retries exceeded for | The API kept returning HTTP 401 after five token refreshes.                                                                                | Replace the refresh token (repeat the credential steps).                                                                     |
| 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 %}
