Policy Set Definitions - List By Management Group

Retrieves all policy set definitions in management group.
This operation retrieves a list of all the a policy set definition in the given management group.

GET https://management.azure.com/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions?api-version=2018-05-01

URI Parameters

Name In Required Type Description
managementGroupId
path True
  • string

The ID of the management group.

api-version
query True
  • string

The API version to use for the operation.

Responses

Name Type Description
200 OK

OK - Returns an array of policy set definitions.

Other Status Codes

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

List policy set definitions at management group level

Sample Request

GET https://management.azure.com/providers/Microsoft.Management/managementgroups/MyManagementGroup/providers/Microsoft.Authorization/policySetDefinitions?api-version=2018-05-01

Sample Response

{
  "value": [
    {
      "properties": {
        "displayName": "[Preview]: Enable Monitoring in Azure Security Center",
        "policyType": "BuiltIn",
        "description": "Monitor all the available security recommendations in Azure Security Center. This is the default policy for Azure Security Center.",
        "metadata": {
          "category": "Security Center"
        },
        "parameters": {},
        "policyDefinitions": [
          {
            "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/a8bef009-a5c9-4d0f-90d7-6018734e8a16"
          },
          {
            "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/af8051bf-258b-44e2-a2bf-165330459f9d"
          },
          {
            "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/86b3d65f-7626-441e-b690-81a8b71cff60"
          },
          {
            "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/655cb504-bcee-4362-bd4c-402e6aa38759"
          },
          {
            "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/b0f33259-77d7-4c9e-aac6-3aabcfae693c"
          },
          {
            "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/47a6b606-51aa-4496-8bb7-64b11cf66adc"
          },
          {
            "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/44452482-524f-4bf4-b852-0bff7cc4a3ed"
          },
          {
            "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/e1e5fd5d-3e4c-4ce1-8661-7d1873ae6b15"
          },
          {
            "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/af6cd1bd-1635-48cb-bde7-5b15693900b9"
          },
          {
            "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/0961003e-5a0a-4549-abde-af6a37f2724d"
          },
          {
            "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/760a85ff-6162-42b3-8d70-698e268f648c"
          },
          {
            "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6"
          },
          {
            "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/9daedab3-fb2d-461e-b861-71790eead4f6"
          }
        ]
      },
      "id": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8",
      "type": "Microsoft.Authorization/policySetDefinitions",
      "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8"
    },
    {
      "id": "/providers/Microsoft.Management/managementgroups/MyManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/CostManagement",
      "type": "Microsoft.Authorization/policySetDefinitions",
      "name": "CostManagement",
      "properties": {
        "displayName": "Cost Management",
        "description": "Policies to enforce low cost storage SKUs",
        "metadata": {
          "category": "Cost Management"
        },
        "policyDefinitions": [
          {
            "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1",
            "parameters": {
              "listOfAllowedSKUs": {
                "value": [
                  "Standard_GRS",
                  "Standard_LRS"
                ]
              }
            }
          },
          {
            "policyDefinitionId": "/providers/Microsoft.Management/managementgroups/MyManagementGroup/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming",
            "parameters": {
              "prefix": {
                "value": "DeptA"
              },
              "suffix": {
                "value": "-LC"
              }
            }
          }
        ]
      }
    }
  ]
}

Definitions

ErrorResponse

Error response indicates Azure Resource Manager is not able to process the incoming request. The reason is provided in the error message.

PolicyDefinitionReference

The policy definition reference.

PolicySetDefinition

The policy set definition.

PolicySetDefinitionListResult

List of policy set definitions.

policyType

The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom.

ErrorResponse

Error response indicates Azure Resource Manager is not able to process the incoming request. The reason is provided in the error message.

Name Type Description
errorCode
  • string

Error code.

errorMessage
  • string

Error message indicating why the operation failed.

httpStatus
  • string

Http status code.

PolicyDefinitionReference

The policy definition reference.

Name Type Description
parameters
  • object

Required if a parameter is used in policy rule.

policyDefinitionId
  • string

The ID of the policy definition or policy set definition.

PolicySetDefinition

The policy set definition.

Name Type Description
id
  • string

The ID of the policy set definition.

name
  • string

The name of the policy set definition.

properties.description
  • string

The policy set definition description.

properties.displayName
  • string

The display name of the policy set definition.

properties.metadata
  • object

The policy set definition metadata.

properties.parameters
  • object

The policy set definition parameters that can be used in policy definition references.

properties.policyDefinitions

An array of policy definition references.

properties.policyType

The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom.

type
  • string

The type of the resource (Microsoft.Authorization/policySetDefinitions).

PolicySetDefinitionListResult

List of policy set definitions.

Name Type Description
nextLink
  • string

The URL to use for getting the next set of results.

value

An array of policy set definitions.

policyType

The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom.

Name Type Description
BuiltIn
  • string
Custom
  • string
NotSpecified
  • string