
# List an application's assignments in an organization

`GET /v1/organizations/{org_id}/applications/{application_id}/assignments` · permission `organizations:write`

Lists the memberships and directory groups the application is assigned to in the organization, oldest first. Only forward pagination is supported: `before` and an `order` other than `asc` return `422`. The cursor is bound to this organization and application. There is no endpoint for reading a single assignment; assignments are immutable and only deleted.

## Request

| Field | Type | Required | Description |
|---|---|---|---|
| `org_id` | path | yes | Organization ID (`org_…`). |
| `application_id` | path | yes | Application ID (`app_…`). |
| `limit` | query | no | 1–100, default 20. |
| `after` | query | no | Cursor from `list_metadata.after`. |

No request body.

## Response

`200 OK` with a page of assignments.

```json
{
  "data": [
    {
      "id": "aas_01j9xq6r0t1v5w7x9y1z3a5b7d",
      "organization_id": "org_01j9xk3m7q8r2s4t6v8w0y2z4a",
      "application_id": "app_01j9xm4n8r9s3t5v7w9x1y3z5b",
      "target_type": "membership",
      "target_id": "mem_01j9xn5p9s0t4v6w8x0y2z4a6c",
      "created_at": "2026-10-12T09:31:00.123456Z"
    }
  ],
  "list_metadata": {
    "before": null,
    "after": null
  }
}
```

## Errors

| HTTP | code | When |
|---|---|---|
| 400 | `invalid_cursor` | The cursor is invalid or belongs to another organization or application. |
| 404 | `not_found` | The organization or application does not exist in this environment. |
| 422 | `validation_failed` | `limit` is out of range, or `before` or a non-`asc` `order` was given. |
| 401 | `unauthenticated` | The credential is missing, invalid or revoked. |
| 403 | `insufficient_permissions` | The credential lacks the required permission. |
| 429 | `rate_limited` | The rate limit was exceeded; retry after the `Retry-After` period. |
| 503 | `service_unavailable` | A dependency is temporarily unavailable; retry after the `Retry-After` period. |

## Example

```bash
curl -i "https://api.eu.keenauth.com/v1/organizations/org_01j9xk3m7q8r2s4t6v8w0y2z4a/applications/app_01j9xm4n8r9s3t5v7w9x1y3z5b/assignments?limit=20" \
  -H "Authorization: Bearer $KEENAUTH_SECRET_KEY"
```
