---
title: "Retrieves all policy assignments that apply to a resource group."
method: GET
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/policyAssignments"
tags: ["PolicyAssignments"]
---

# Retrieves all policy assignments that apply to a resource group.

`GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/policyAssignments`

This operation retrieves the list of all policy assignments associated with the given resource group in the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource group, including those that apply directly or apply from containing scopes, as well as any applied to resources contained within the resource group. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource group, which is everything in the unfiltered list except those applied to resources contained within the resource group. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value} that apply to the resource group.

## Path parameters

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

## Query parameters

- `$filter` string
- `api-version` string, required

## Response `200`

OK - Returns an array of policy assignments.

- PolicyAssignmentListResult — List of policy assignments.
  - `value` PolicyAssignment[] — An array of policy assignments.
    - `properties` PolicyAssignmentProperties — The policy assignment properties.
      - `displayName` string — The display name of the policy assignment.
      - `policyDefinitionId` string — The ID of the policy definition or policy set definition being assigned.
      - `scope` string — The scope for the policy assignment.
      - `notScopes` string[] — The policy's excluded scopes.
      - `parameters` object — Required if a parameter is used in policy rule.
      - `description` string — This message will be part of response in case of policy violation.
      - `metadata` object — The policy assignment metadata.
      - `enforcementMode` 'Default' | 'DoNotEnforce' — The policy assignment enforcement mode. Possible values are Default and DoNotEnforce.
    - `id` string — The ID of the policy assignment.
    - `type` string — The type of the policy assignment.
    - `name` string — The name of the policy assignment.
    - `sku` PolicySku — The policy sku. This property is optional, obsolete, and will be ignored.
      - `name` string, required — The name of the policy sku. Possible values are A0 and A1.
      - `tier` string — The policy sku tier. Possible values are Free and Standard.
    - `location` string — The location of the policy assignment. Only required when utilizing managed identity.
    - `identity` Identity — Identity for the resource.
      - `principalId` string — The principal ID of the resource identity.
      - `tenantId` string — The tenant ID of the resource identity.
      - `type` 'SystemAssigned' | 'None' — The identity type.
  - `nextLink` string — The URL to use for getting the next set of results.

## Other responses

- `default` — Error response describing why the operation failed.

---

[API](https://skmtc.net/azure/apis/policyclient-2.md) · [All operations](https://skmtc.net/azure/apis/policyclient-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/policyclient-2/versions/cd0bdb00ef1a/schema)
