---
title: "GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiPolicies"
method: GET
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiPolicies"
tags: ["RaiPolicies"]
---

# GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiPolicies

`GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiPolicies`

## Request

- Base URL: `https://management.azure.com`
- URL: `https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiPolicies`
- Auth: OAuth 2
  - Implicit: `https://login.microsoftonline.com/common/oauth2/authorize`
  - Scopes: `user_impersonation`

Gets the content filters associated with the Azure OpenAI account.

## Path parameters

- `subscriptionId` string, required
- `resourceGroupName` string, required
- `accountName` string, required

## Query parameters

- `api-version` string, required

## Response `200`

The request has succeeded.

- RaiPolicyListResult: The list of cognitive services RaiPolicies.
  - `nextLink` string: The link used to get the next page of RaiPolicy.
  - `value` RaiPolicy[]: The list of RaiPolicy.
    - `id` string: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
    - `name` string: The name of the resource
    - `type` string: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    - `systemData` SystemData: Metadata pertaining to creation and last modification of the resource.
      - `createdBy` string: The identity that created the resource.
      - `createdByType` 'User' | 'Application' | 'ManagedIdentity' | 'Key': The type of identity that created the resource.
      - `createdAt` string, date-time: The timestamp of resource creation (UTC).
      - `lastModifiedBy` string: The identity that last modified the resource.
      - `lastModifiedByType` 'User' | 'Application' | 'ManagedIdentity' | 'Key': The type of identity that last modified the resource.
      - `lastModifiedAt` string, date-time: The timestamp of resource last modification (UTC)
    - `properties` RaiPolicyProperties: Azure OpenAI Content Filters properties.
      - `type` 'UserManaged' | 'SystemManaged': Content Filters policy type.
      - `mode` 'Default' | 'Deferred' | 'Blocking' | 'Asynchronous_filter': Rai policy mode. The enum value mapping is as below: Default = 0, Deferred=1, Blocking=2, Asynchronous_filter =3. Please use 'Asynchronous_filter' after 2025-06-01. It is the same as 'Deferred' in previous version.
      - `basePolicyName` string: Name of Rai policy.
      - `contentFilters` RaiPolicyContentFilter[]: The list of Content Filters.
        - `name` string: Name of ContentFilter.
        - `enabled` boolean: If the ContentFilter is enabled.
        - `severityThreshold` 'Low' | 'Medium' | 'High': Level at which content is filtered.
        - `blocking` boolean: If blocking would occur.
        - `source` 'Prompt' | 'Completion' | 'PreToolCall' | 'PostToolCall' | 'PreRun' | 'PostRun': Content source to apply the Content Filters.
        - `action` 'None' | 'BLOCKING' | 'ANNOTATING' | 'HITL' | 'RETRY': The action types to apply to the content filters
      - `customBlocklists` CustomBlocklistConfig[]: The list of custom Blocklist.
        - `blocklistName` string: Name of ContentFilter.
        - `blocking` boolean: If blocking would occur.
        - `source` 'Prompt' | 'Completion' | 'PreToolCall' | 'PostToolCall' | 'PreRun' | 'PostRun': Content source to apply the Content Filters.
      - `safetyProviders` SafetyProviderConfig[]: The list of Safety Providers.
        - `safetyProviderName` string: Name of RAI Safety Provider.
        - `blocking` boolean: If blocking would occur.
        - `source` 'Prompt' | 'Completion' | 'PreToolCall' | 'PostToolCall' | 'PreRun' | 'PostRun': Content source to apply the Content Filters.
      - `egressPolicy` RaiEgressPolicyConfig: Egress (outbound network) policy configuration nested within an RAI policy. Controls which external endpoints sandboxed agents can reach and what transformations (header injection, URL rewrite) are applied to matching traffic.
        - `mode` 'Enforced' | 'Audit': The enforcement mode for egress rules. If omitted on create, the server defaults to Enforced.
        - `defaultAction` 'Allow' | 'Deny': The default action when no user-defined egress rules match.
        - `description` string: Description of the egress policy.
        - `rules` RaiEgressRule[]: Ordered list of egress rules. First matching rule wins. Rules are evaluated in declaration order; the first rule whose match criteria are satisfied determines the action taken on the request.
          - `name` string, required: Name of the rule. Must be unique within the policy.
          - `description` string: Description of the rule.
          - `ruleType` 'Fqdn', required: The type of an egress rule, determining what kind of traffic matching it performs.
          - `match` RaiEgressRuleMatch: The match criteria for an egress rule. If both host and path are omitted, the rule matches all traffic. Host uses DNS wildcard syntax (e.g., "\*.openai.com" matches "api.openai.com"). Path uses URI prefix matching with an asterisk as a single-segment wildcard. For example, "/v1/\*" matches "/v1/chat".
            - `host` string: Host pattern to match using DNS wildcard syntax (e.g., "\*.openai.com"). A leading "\*." matches any subdomain. Omit to match all hosts.
            - `path` string: Path pattern to match using URI prefix matching. An asterisk serves as a single-segment wildcard. For example, "/v1/\*" matches "/v1/chat". Omit to match all paths.
          - `action` RaiEgressRuleAction, required: The action an egress rule takes when it matches. - Allow/Deny: no additional fields needed; headers and rewrite must not be set. - Transform: headers is required with at least one entry; rewrite must not be set. - Rewrite: rewrite is required with at least one of scheme/host/path; headers is optional for injecting headers alongside the redirect.
            - `actionType` 'Allow' | 'Deny' | 'Transform' | 'Rewrite', required: The kind of action an egress rule takes when it matches.
            - `headers` RaiEgressHeaderTransform[]: Header transforms to apply. Required for Transform; optional for Rewrite; not allowed for Allow or Deny.
              - …
            - `rewrite` RaiEgressRewriteTarget: Where a Rewrite action sends matched traffic. At least one field must be set; omitted fields retain the original request values. This constraint is enforced by the server (400 Bad Request if all fields are omitted).
              - …
    - `etag` string: Resource Etag.
    - `tags` object: Resource tags.

## Other responses

- `default`: An unexpected error response.

## Changes

- **2026-07-13** (2016-02-01-preview) `d0eb21b3d2a7`: 3 breaking
  - added the new path request parameter `resourceGroupName`
  - added the new path request parameter `subscriptionId`
  - added the new required `query` request parameter `api-version`
- **2026-07-13** (2016-02-01-preview) `f8b73d04ceaa`: 1 info
  - endpoint added
- **2017-12-28** (2016-02-01-preview) `9fddc284caf8`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/azure/apis/cognitiveservices-microsoft-cognitiveservices/changes/subscriptions/:subscriptionId/resourceGroups/:resourceGroupName/providers/Microsoft.CognitiveServices/accounts/:accountName/raiPolicies/get.md)

---

[API](https://skmtc.dev/azure/apis/cognitiveservices-microsoft-cognitiveservices.md) - [All operations](https://skmtc.dev/azure/apis/cognitiveservices-microsoft-cognitiveservices/llms.txt) - [OpenAPI document](https://skmtc.dev/azure/apis/cognitiveservices-microsoft-cognitiveservices/revisions/d0eb21b3d2a7?raw)
