---
title: "GET /v2/organizations/{organizationsId}/customConstraints"
method: GET
path: "/v2/organizations/{organizationsId}/customConstraints"
tags: ["organizations"]
---

# GET /v2/organizations/{organizationsId}/customConstraints

`GET /v2/organizations/{organizationsId}/customConstraints`

## Request

- Base URL: `https://orgpolicy.googleapis.com`
- URL: `https://orgpolicy.googleapis.com/v2/organizations/{organizationsId}/customConstraints`
- Auth: one of:
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloud-platform`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/organizationpolicy`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/organizationpolicy`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/organizationpolicy.readonly`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/organizationpolicy.readonly`

Retrieves all of the custom constraints that exist on a particular organization resource.

## Path parameters

- `organizationsId` string, required

## Query parameters

- `$.xgafv` '1' | '2'
- `access_token` string
- `alt` 'json' | 'media' | 'proto'
- `callback` string
- `fields` string
- `key` string
- `oauth_token` string
- `prettyPrint` boolean
- `quotaUser` string
- `uploadType` string
- `upload_protocol` string
- `pageSize` integer
- `pageToken` string

## Response `200`

Successful response

- GoogleCloudOrgpolicyV2ListCustomConstraintsResponse: The response returned from the ListCustomConstraints method. It will be empty if no custom or managed constraints are set on the organization resource.
  - `customConstraints` GoogleCloudOrgpolicyV2CustomConstraint[]: All custom and managed constraints that exist on the organization resource. It will be empty if no custom constraints are set.
    - `actionType` 'ACTION_TYPE_UNSPECIFIED' | 'ALLOW' | 'DENY': Allow or deny type.
    - `condition` string: A Common Expression Language (CEL) condition which is used in the evaluation of the constraint. For example: `resource.instanceName.matches("(production|test)_(.+_)?[\d]+")` or, `resource.management.auto_upgrade == true` The max length of the condition is 1,500 characters.
    - `description` string: Detailed information about this custom policy constraint. The max length of the description is 2000 characters.
    - `displayName` string: One line display name for the UI. The max length of the display_name is 200 characters.
    - `methodTypes` string[]: All the operations being applied for this constraint.
    - `name` string: Immutable. Name of the constraint. This is unique within the organization. The name must be of the form: * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The max length is 71 characters and the minimum length is 1. Note that the prefix `organizations/{organization_id}/customConstraints/custom.` is not counted.
    - `resourceTypes` string[]: Immutable. The resource instance type on which this policy applies. Format will be of the form : `/` Example: * `compute.googleapis.com/Instance`.
    - `updateTime` string, google-datetime: Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` methods were called.
  - `nextPageToken` string: Page token used to retrieve the next page. This is not used, but the server may at any point start supplying a valid token.

## Changes

- **2026-11-23** `373057a726d5`: 4 info
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/organizationpolicy.readonly` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/organizationpolicy.readonly` was removed from the endpoint's security scheme `Oauth2c`

[Operation history](https://skmtc.dev/google/apis/orgpolicy/changes/v2/organizations/:organizationsId/customConstraints/get.md)

---

[API](https://skmtc.dev/google/apis/orgpolicy.md) - [All operations](https://skmtc.dev/google/apis/orgpolicy/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/orgpolicy/revisions/373057a726d5?raw)
