> 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-and-access-management-iam.md).

# Oracle Identity and Access Management (IAM)

Oracle IAM identity domains manage users and access in Oracle Cloud. OctoXLabs reads the users of one identity domain with their group membership, administrator app roles and last successful login.

## Use cases

* List identity domain users that OctoXLabs has collected.

```
Adapters = oracle-iam
```

* Review users that were not active recently, when last logon time is mapped.

```
Adapters = oracle-iam AND NOT LastSeen last now-90d/d
```

## Before you begin

### Network

| Source              | Destination                                                            | Port | Protocol |
| ------------------- | ---------------------------------------------------------------------- | ---- | -------- |
| OctoXLabs connector | Identity domain host, for example `idcs-<id>.identity.oraclecloud.com` | 443  | HTTPS    |

### Required permissions

| Scope or role                                                     | Permission                                         | Needed for                   |
| ----------------------------------------------------------------- | -------------------------------------------------- | ---------------------------- |
| App role: Security Administrator or Identity Domain Administrator | Added to the token of the confidential application | Users, groups and last login |

## Create credentials in Oracle Identity and Access Management (IAM)

{% stepper %}
{% step %}

### Open Integrated applications

In the identity domain open **Integrated applications**, click **Add application**, select **Confidential Application**, click **Launch workflow** and enter a name.
{% endstep %}

{% step %}

### Configure the client

Under **Client configuration**, choose **Configure this application as a client now** and allow only the **Client credentials** grant type.
{% endstep %}

{% step %}

### Add an app role

Under **Token issuance policy**, enable **Add app roles** and add **Security Administrator** or **Identity Domain Administrator**.
{% endstep %}

{% step %}

### Copy the credentials

Click **Finish** and copy the **Client ID** and **Client secret** from the **Application added** dialog.
{% endstep %}

{% step %}

### Activate the application

On the application details page click **Activate**. The application is created deactivated.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter     | Required | Type    | Default                  | Description                                                                                                                                                                                         |
| ------------- | -------- | ------- | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Domain        | Yes      | String  |                          | Host of the identity domain URL, without `https://` and port. In the OCI Console open **Identity & Security > Domains**, select the domain and copy the **Domain URL** from **Domain information**. |
| 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.                                                                                                                                                               |
| Page Size     | No       | Integer | 500                      | Users per request, 1 to 1000.                                                                                                                                                                       |
| Is Secure     | No       | Boolean | True                     | Use HTTPS.                                                                                                                                                                                          |
| Proxy         | No       | String  |                          | Proxy address as `host:port`.                                                                                                                                                                       |
| Timeout       | No       | Integer | 30                       | Seconds to wait for API responses.                                                                                                                                                                  |

## Troubleshooting

| Error message                       | Cause                                  | Fix                                                                          |
| ----------------------------------- | -------------------------------------- | ---------------------------------------------------------------------------- |
| No access\_token in the response of | The token call did not return a token. | Check Client ID, Client Secret, Scope and that the application is activated. |
| Max retries exceeded for            | Oracle answered 401 or 429 repeatedly. | Check credentials and wait before running discovery again.                   |

## Change history

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