# Search IAM policies

`GET /v1/iam-policies/search`, operation `iamPolicies.SearchIamPolicies`

Searches the IAM policies of an organization and of the resources in it.

A policy is returned only to callers who may read it, by its resource's getIamPolicy permission; others are neither named nor counted.

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `scope` | query | Yes | `string` | The organization whose policies are searched, organizations/{organization_id}, with those of everything in it. |
| `member` | query | No | `string` | A principal, by ID: user:{user_id}, group:{group_id} or serviceAccount:{service_account_id}. Only the bindings that grant it a role are returned: to it, or to a group it is in, at any depth, among the groups whose members the caller may list. Unset, every binding is. Email addresses are refused, and other groups left out, since the answer would tell those who cannot list the organization's people or a group's members who is in them. |
| `pageSize` | query | No | `integer (int32)` | Maximum number of resources to return. Defaults to 50; values above 500 are treated as 500. A page may hold fewer, or none, before the last: it leaves out the policies the caller may not read, and reads at most 1,000 in all. Search on while nextPageToken is set. |
| `pageToken` | query | No | `string` | Page token from a previous response with the same scope and member. Tokens are sealed, and tell nothing of the policies they skip. |

## Responses

### 200

OK

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `nextPageToken` | `string` | Yes | Token for the next page; empty on the last page. |
| `results` | `PolicySearchResult[]` | Yes | The policies found, by resource name. |

### default

Error

Base URL: `https://api.kosem.ai`. See [API conventions](https://docs.kosem.ai/reference/api-conventions.md) for authentication, pagination and errors, and [https://docs.kosem.ai/openapi.yaml](https://docs.kosem.ai/openapi.yaml) for the full OpenAPI document.