> 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/o/oracle-identity-cloud-service.md).

# Oracle Identity Cloud Service

Oracle Identity Cloud Service (IDCS) is Oracle's identity service. OctoXLabs reads the users of an IDCS tenant, with their group membership, to add them to the inventory.

## Use cases

* List IDCS users that OctoXLabs has collected.

```
Adapters = oracle-idcs
```

## Before you begin

### Network

| Source              | Destination                                                          | Port | Protocol |
| ------------------- | -------------------------------------------------------------------- | ---- | -------- |
| OctoXLabs connector | IDCS tenant host, for example `idcs-abc123.identity.oraclecloud.com` | 443  | HTTPS    |

### Required permissions

| Scope or role                                                                             | Permission                                      | Needed for       |
| ----------------------------------------------------------------------------------------- | ----------------------------------------------- | ---------------- |
| Role that can read users, for example User Administrator or Identity Domain Administrator | Access to the Identity Cloud Service Admin APIs | Users and groups |

## Create credentials in Oracle Identity Cloud Service

{% stepper %}
{% step %}

### Add a confidential application

In the IDCS admin console go to **Applications**, then **Add**, then **Confidential Application**.
{% endstep %}

{% step %}

### Allow client credentials

Under **Client Configuration**, allow the **Client Credentials** grant type.
{% endstep %}

{% step %}

### Grant API access

Grant the application access to the Identity Cloud Service Admin APIs with a role that can read users, such as User Administrator or Identity Domain Administrator.
{% endstep %}

{% step %}

### Activate and copy

Save and activate the application, then copy the Client ID and Client Secret.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter     | Required | Type    | Default                  | Description                                                                                                                  |
| ------------- | -------- | ------- | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| Domain        | Yes      | String  |                          | IDCS tenant base URL, for example `idcs-abc123.identity.oraclecloud.com`. `https://` is added if you leave it out.           |
| Client ID     | Yes      | String  |                          | Client ID of the confidential application.                                                                                   |
| Client Secret | Yes      | String  |                          | Client secret of the application.                                                                                            |
| Scope         | No       | String  | urn:opc:idm:**myscopes** | OAuth scope requested with the token. IDCS issues a token for a wrong scope too, and the user calls then fail with 401.      |
| Fetch Groups  | No       | Boolean | True                     | Collect group membership. IDCS returns groups only when asked, so turning this off leaves membership empty without an error. |
| Page Size     | No       | Integer | 50                       | Users per request. Minimum 1. No maximum is published.                                                                       |
| Proxy         | No       | String  |                          | Proxy address as `host:port`.                                                                                                |
| Timeout       | No       | Integer | 30                       | Seconds to wait for API responses.                                                                                           |

## Troubleshooting

| Error message                                                                | Cause                                                                                           | Fix                                                                       |
| ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| The supplied credentials, if any, are not sufficient to access the resource. | The token was issued with the wrong scope, or the application lacks a role that can read users. | Check Scope and the role granted to the application.                      |
| Max retries exceeded for                                                     | The server kept answering 401 after a new token was requested.                                  | Check Client ID, Client Secret, Scope and that the application is active. |

## Change history

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