---
title: Get AWS IAM Identity Center account prerequisites
description: Get the integrated AWS accounts that the AWS IAM Identity Center entity context sync reads users from, and whether users have been collected from them.
breadcrumbs: Docs > API > Get AWS IAM Identity Center account prerequisites
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Get AWS IAM Identity Center account prerequisites

## v2 (latest)

{% alert level="warning" %}
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help.md).
{% /alert %}

| Datadog site      | API endpoint                                                                                                                   |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/security_monitoring/configuration/integration_config/aws_identity_center/aws_accounts     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/security_monitoring/configuration/integration_config/aws_identity_center/aws_accounts |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/security_monitoring/configuration/integration_config/aws_identity_center/aws_accounts |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/security_monitoring/configuration/integration_config/aws_identity_center/aws_accounts      |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/security_monitoring/configuration/integration_config/aws_identity_center/aws_accounts |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/security_monitoring/configuration/integration_config/aws_identity_center/aws_accounts |
| uk1.datadoghq.com | GET https://api.uk1.datadoghq.com/api/v2/security_monitoring/configuration/integration_config/aws_identity_center/aws_accounts |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/security_monitoring/configuration/integration_config/aws_identity_center/aws_accounts      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v2/security_monitoring/configuration/integration_config/aws_identity_center/aws_accounts  |

### Overview

Get the integrated AWS accounts that the AWS IAM Identity Center entity context sync reads users from, and
whether users have been collected from them. Collected users are a prerequisite for creating or enabling the
AWS IAM Identity Center entity context sync configuration. The accounts include AWS Organization management
accounts and any accounts that users were collected from.

This endpoint requires the `integrations_read` permission.

OAuth apps require the `integrations_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#security-monitoring) to access this endpoint.

### Response

{% tabs %}
{% tab label="200" %}
OK

{% tabs %}
{% tab label="Model" %}
Response containing the AWS account prerequisites for the AWS IAM Identity Center integration.

| Parent field | Field                                    | Type     | Description                                                                                                                                                                                    |
| ------------ | ---------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|              | data [*required*]                        | object   | The AWS account prerequisites for the AWS IAM Identity Center integration.                                                                                                                     |
| data         | attributes [*required*]                  | object   | The attributes of the AWS IAM Identity Center AWS account prerequisites.                                                                                                                       |
| attributes   | aws_accounts [*required*]                | [object] | The integrated AWS accounts that users are read from, including AWS Organization management accounts and any accounts that users were collected from.                                          |
| aws_accounts | account_config_id [*required*]           | string   | The ID of the AWS account integration configuration.                                                                                                                                           |
| aws_accounts | account_id [*required*]                  | string   | The AWS account ID.                                                                                                                                                                            |
| aws_accounts | account_name [*required*]                | string   | The name of the AWS account integration.                                                                                                                                                       |
| aws_accounts | collecting_users [*required*]            | boolean  | Whether AWS IAM Identity Center users were collected from this AWS account.                                                                                                                    |
| aws_accounts | resource_collection_enabled [*required*] | boolean  | Whether resource collection is enabled for this AWS account.                                                                                                                                   |
| attributes   | has_valid_prerequisite [*required*]      | boolean  | Whether AWS IAM Identity Center users were collected for the organization.                                                                                                                     |
| attributes   | reason                                   | string   | The missing setup step when `has_valid_prerequisite` is `false`.                                                                                                                               |
| data         | id [*required*]                          | string   | The ID of the organization the AWS accounts belong to.                                                                                                                                         |
| data         | type [*required*]                        | enum     | The type of the resource. The value should always be `aws_identity_center_aws_accounts`. Allowed enum values: `aws_identity_center_aws_accounts`. Default: `aws_identity_center_aws_accounts`. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "data": {
    "attributes": {
      "aws_accounts": [
        {
          "account_config_id": "11111111-2222-3333-4444-555555555555",
          "account_id": "111122223333",
          "account_name": "management",
          "collecting_users": false,
          "resource_collection_enabled": true
        }
      ],
      "has_valid_prerequisite": false,
      "reason": "Resource collection on an AWS Organization management account is required"
    },
    "id": "123456",
    "type": "aws_identity_center_aws_accounts"
  }
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="403" %}
Not Authorized

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="429" %}
Too many requests

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}
{% /tabs %}

### Code Example

{% tabs %}
{% tab label="Curl" %}
```bash
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com" # Or us3.datadoghq.com, us5.datadoghq.com, datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com, ddog-gov.com, us2.ddog-gov.com
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v2/security_monitoring/configuration/integration_config/aws_identity_center/aws_accounts" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
```
{% /tab %}
{% /tabs %}
