Azure Policy Policy Set Definitions API
The PolicySetDefinitions API from Azure Policy — 6 operation(s) for policysetdefinitions.
The PolicySetDefinitions API from Azure Policy — 6 operation(s) for policysetdefinitions.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/microsoft-azure-policy:microsoft-azure-policy-policysetdefinitions-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: PolicyClient Policy Set Definitions API
version: '2025-01-01'
description: To manage and control access to your resources, you can define customized policies and assign them at a scope.
servers:
- url: https://management.azure.com
security:
- azure_auth:
- user_impersonation
tags:
- name: PolicySetDefinitions
paths:
/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}:
put:
tags:
- PolicySetDefinitions
operationId: PolicySetDefinitions_CreateOrUpdate
summary: Creates or updates a policy set definition
description: This operation creates or updates a policy set definition in the given subscription with the given name.
parameters:
- $ref: '#/components/parameters/SubscriptionIdParameter'
- name: policySetDefinitionName
in: path
required: true
description: The name of the policy set definition to create.
schema:
type: string
pattern: ^[^<>%&:\?/]*[^<>%&:\?/ ]+$
- $ref: '#/components/parameters/ApiVersionParameter'
responses:
'201':
description: Created - Returns information about the policy set definition.
content:
application/json:
schema:
$ref: '#/components/schemas/PolicySetDefinition'
'200':
description: OK - Returns information about the policy set definition.
content:
application/json:
schema:
$ref: '#/components/schemas/PolicySetDefinition'
default:
description: Error response describing why the operation failed.
content:
application/json:
schema:
$ref: '#/components/schemas/CloudError'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PolicySetDefinition'
description: The policy set definition properties.
required: true
delete:
tags:
- PolicySetDefinitions
operationId: PolicySetDefinitions_Delete
summary: Deletes a policy set definition
description: This operation deletes the policy set definition in the given subscription with the given name.
parameters:
- $ref: '#/components/parameters/SubscriptionIdParameter'
- name: policySetDefinitionName
in: path
required: true
description: The name of the policy set definition to delete.
schema:
type: string
pattern: ^[^<>%&:\?/]*[^<>%&:\?/ ]+$
- $ref: '#/components/parameters/ApiVersionParameter'
responses:
'204':
description: No Content - the policy set definition doesn't exist in the subscription.
'200':
description: OK
default:
description: Error response describing why the operation failed.
content:
application/json:
schema:
$ref: '#/components/schemas/CloudError'
get:
tags:
- PolicySetDefinitions
operationId: PolicySetDefinitions_Get
summary: Retrieves a policy set definition
description: This operation retrieves the policy set definition in the given subscription with the given name.
parameters:
- $ref: '#/components/parameters/SubscriptionIdParameter'
- name: policySetDefinitionName
in: path
required: true
description: The name of the policy set definition to get.
schema:
type: string
pattern: ^[^<>%&:\?/]*[^<>%&:\?/ ]+$
- $ref: '#/components/parameters/PolicySetDefinitionsExpandParameter'
- $ref: '#/components/parameters/ApiVersionParameter'
responses:
'200':
description: OK - Returns information about the policy set definition.
content:
application/json:
schema:
$ref: '#/components/schemas/PolicySetDefinition'
default:
description: Error response describing why the operation failed.
content:
application/json:
schema:
$ref: '#/components/schemas/CloudError'
/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}:
get:
tags:
- PolicySetDefinitions
operationId: PolicySetDefinitions_GetBuiltIn
summary: Retrieves a built in policy set definition
description: This operation retrieves the built-in policy set definition with the given name.
parameters:
- name: policySetDefinitionName
in: path
required: true
description: The name of the policy set definition to get.
schema:
type: string
pattern: ^[^<>%&:\?/]*[^<>%&:\?/ ]+$
- $ref: '#/components/parameters/PolicySetDefinitionsExpandParameter'
- $ref: '#/components/parameters/ApiVersionParameter'
responses:
'200':
description: OK - Returns information about the built in policy set definition.
content:
application/json:
schema:
$ref: '#/components/schemas/PolicySetDefinition'
default:
description: Error response describing why the operation failed.
content:
application/json:
schema:
$ref: '#/components/schemas/CloudError'
/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions:
get:
tags:
- PolicySetDefinitions
operationId: PolicySetDefinitions_List
summary: Retrieves the policy set definitions for a subscription
description: 'This operation retrieves a list of all the policy set definitions in a given subscription that match the optional given $filter. Valid values for $filter are: ''atExactScope()'', ''policyType -eq {value}'' or ''category eq ''{value}''''. If $filter is not provided, the unfiltered list includes all policy set definitions associated with the subscription, including those that apply directly or from management groups that contain the given subscription. If $filter=atExactScope() is provided, the returned list only includes all policy set definitions that at the given subscription. If $filter=''policyType -eq {value}'' is provided, the returned list only includes all policy set definitions whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn and Custom. If $filter=''category -eq {value}'' is provided, the returned list only includes all policy set definitions whose category match the {value}.'
parameters:
- $ref: '#/components/parameters/SubscriptionIdParameter'
- $ref: '#/components/parameters/ApiVersionParameter'
- $ref: '#/components/parameters/PolicySetDefinitionsFilterParameter'
- $ref: '#/components/parameters/PolicySetDefinitionsExpandParameter'
- $ref: '#/components/parameters/TopParameter'
responses:
'200':
description: OK - Returns an array of policy set definitions.
content:
application/json:
schema:
$ref: '#/components/schemas/PolicySetDefinitionListResult'
default:
description: Error response describing why the operation failed.
content:
application/json:
schema:
$ref: '#/components/schemas/CloudError'
x-ms-pageable:
nextLinkName: nextLink
/providers/Microsoft.Authorization/policySetDefinitions:
get:
tags:
- PolicySetDefinitions
operationId: PolicySetDefinitions_ListBuiltIn
summary: Retrieves built-in policy set definitions
description: This operation retrieves a list of all the built-in policy set definitions that match the optional given $filter. If $filter='category -eq {value}' is provided, the returned list only includes all built-in policy set definitions whose category match the {value}.
parameters:
- $ref: '#/components/parameters/ApiVersionParameter'
- $ref: '#/components/parameters/PolicySetDefinitionsFilterParameter'
- $ref: '#/components/parameters/PolicySetDefinitionsExpandParameter'
- $ref: '#/components/parameters/TopParameter'
responses:
'200':
description: OK - Returns an array of built in policy set definitions.
content:
application/json:
schema:
$ref: '#/components/schemas/PolicySetDefinitionListResult'
default:
description: Error response describing why the operation failed.
content:
application/json:
schema:
$ref: '#/components/schemas/CloudError'
x-ms-pageable:
nextLinkName: nextLink
? /providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}
: put:
tags:
- PolicySetDefinitions
operationId: PolicySetDefinitions_CreateOrUpdateAtManagementGroup
summary: Creates or updates a policy set definition
description: This operation creates or updates a policy set definition in the given management group with the given name.
parameters:
- $ref: '#/components/parameters/ManagementGroupIdParameter'
- name: policySetDefinitionName
in: path
required: true
description: The name of the policy set definition to create.
schema:
type: string
pattern: ^[^<>%&:\?/]*[^<>%&:\?/ ]+$
- $ref: '#/components/parameters/ApiVersionParameter'
responses:
'201':
description: Created - Returns information about the policy set definition.
content:
application/json:
schema:
$ref: '#/components/schemas/PolicySetDefinition'
'200':
description: OK - Returns information about the policy set definition.
content:
application/json:
schema:
$ref: '#/components/schemas/PolicySetDefinition'
default:
description: Error response describing why the operation failed.
content:
application/json:
schema:
$ref: '#/components/schemas/CloudError'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PolicySetDefinition'
description: The policy set definition properties.
required: true
delete:
tags:
- PolicySetDefinitions
operationId: PolicySetDefinitions_DeleteAtManagementGroup
summary: Deletes a policy set definition
description: This operation deletes the policy set definition in the given management group with the given name.
parameters:
- $ref: '#/components/parameters/ManagementGroupIdParameter'
- name: policySetDefinitionName
in: path
required: true
description: The name of the policy set definition to delete.
schema:
type: string
pattern: ^[^<>%&:\?/]*[^<>%&:\?/ ]+$
- $ref: '#/components/parameters/ApiVersionParameter'
responses:
'204':
description: No Content - the policy set definition doesn't exist in the subscription.
'200':
description: OK
default:
description: Error response describing why the operation failed.
content:
application/json:
schema:
$ref: '#/components/schemas/CloudError'
get:
tags:
- PolicySetDefinitions
operationId: PolicySetDefinitions_GetAtManagementGroup
summary: Retrieves a policy set definition
description: This operation retrieves the policy set definition in the given management group with the given name.
parameters:
- $ref: '#/components/parameters/ManagementGroupIdParameter'
- name: policySetDefinitionName
in: path
required: true
description: The name of the policy set definition to get.
schema:
type: string
pattern: ^[^<>%&:\?/]*[^<>%&:\?/ ]+$
- $ref: '#/components/parameters/PolicySetDefinitionsExpandParameter'
- $ref: '#/components/parameters/ApiVersionParameter'
responses:
'200':
description: OK - Returns information about the policy set definition.
content:
application/json:
schema:
$ref: '#/components/schemas/PolicySetDefinition'
default:
description: Error response describing why the operation failed.
content:
application/json:
schema:
$ref: '#/components/schemas/CloudError'
? /providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions
: get:
tags:
- PolicySetDefinitions
operationId: PolicySetDefinitions_ListByManagementGroup
summary: Retrieves all policy set definitions in management group
description: 'This operation retrieves a list of all the policy set definitions in a given management group that match the optional given $filter. Valid values for $filter are: ''atExactScope()'', ''policyType -eq {value}'' or ''category eq ''{value}''''. If $filter is not provided, the unfiltered list includes all policy set definitions associated with the management group, including those that apply directly or from management groups that contain the given management group. If $filter=atExactScope() is provided, the returned list only includes all policy set definitions that at the given management group. If $filter=''policyType -eq {value}'' is provided, the returned list only includes all policy set definitions whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn and Custom. If $filter=''category -eq {value}'' is provided, the returned list only includes all policy set definitions whose category match the {value}.'
parameters:
- $ref: '#/components/parameters/ManagementGroupIdParameter'
- $ref: '#/components/parameters/ApiVersionParameter'
- $ref: '#/components/parameters/PolicySetDefinitionsFilterParameter'
- $ref: '#/components/parameters/PolicySetDefinitionsExpandParameter'
- $ref: '#/components/parameters/TopParameter'
responses:
'200':
description: OK - Returns an array of policy set definitions.
content:
application/json:
schema:
$ref: '#/components/schemas/PolicySetDefinitionListResult'
default:
description: Error response describing why the operation failed.
content:
application/json:
schema:
$ref: '#/components/schemas/CloudError'
x-ms-pageable:
nextLinkName: nextLink
components:
schemas:
ParameterValues:
type: object
additionalProperties:
$ref: '#/components/schemas/ParameterValuesValue'
description: The parameter values for the policy rule. The keys are the parameter names.
ParameterDefinitions:
description: The parameter definitions for parameters used in the policy. The keys are the parameter names.
type: object
additionalProperties:
$ref: '#/components/schemas/ParameterDefinitionsValue'
systemData:
type: object
description: Metadata pertaining to creation and last modification of the resource.
properties:
createdBy:
type: string
description: The identity that created the resource.
createdByType:
type: string
description: The type of identity that created the resource.
enum:
- User
- Application
- ManagedIdentity
- Key
x-ms-enum:
name: createdByType
modelAsString: true
createdAt:
type: string
format: date-time
description: The timestamp of resource creation (UTC).
lastModifiedBy:
type: string
description: The identity that last modified the resource.
lastModifiedByType:
type: string
description: The type of identity that last modified the resource.
enum:
- User
- Application
- ManagedIdentity
- Key
x-ms-enum:
name: createdByType
modelAsString: true
lastModifiedAt:
type: string
format: date-time
description: The timestamp of resource last modification (UTC)
readOnly: true
ErrorResponse:
title: Error Response
description: Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.)
type: object
properties:
code:
readOnly: true
type: string
description: The error code.
message:
readOnly: true
type: string
description: The error message.
target:
readOnly: true
type: string
description: The error target.
details:
readOnly: true
type: array
items:
$ref: '#/components/schemas/ErrorResponse'
x-ms-identifiers:
- message
- target
description: The error details.
additionalInfo:
readOnly: true
type: array
items:
$ref: '#/components/schemas/ErrorAdditionalInfo'
x-ms-identifiers: []
description: The error additional info.
PolicyDefinitionGroup:
type: object
properties:
name:
type: string
description: The name of the group.
displayName:
type: string
description: The group's display name.
category:
type: string
description: The group's category.
description:
type: string
description: The group's description.
additionalMetadataId:
type: string
description: A resource ID of a resource that contains additional metadata about the group.
required:
- name
description: The policy definition group.
PolicySetDefinitionListResult:
type: object
properties:
value:
type: array
items:
$ref: '#/components/schemas/PolicySetDefinition'
description: An array of policy set definitions.
nextLink:
type: string
description: The URL to use for getting the next set of results.
description: List of policy set definitions.
PolicySetDefinition:
type: object
properties:
properties:
x-ms-client-flatten: true
$ref: '#/components/schemas/PolicySetDefinitionProperties'
description: The policy set definition properties.
id:
readOnly: true
type: string
description: The ID of the policy set definition.
name:
readOnly: true
type: string
description: The name of the policy set definition.
type:
readOnly: true
type: string
description: The type of the resource (Microsoft.Authorization/policySetDefinitions).
systemData:
$ref: '#/components/schemas/systemData'
readOnly: true
description: The system metadata relating to this resource.
description: The policy set definition.
x-ms-azure-resource: true
PolicyDefinitionReference:
type: object
properties:
policyDefinitionId:
type: string
description: The ID of the policy definition or policy set definition.
definitionVersion:
type: string
description: The version of the policy definition to use.
latestDefinitionVersion:
type: string
description: The latest version of the policy definition available. This is only present if requested via the $expand query parameter.
readOnly: true
effectiveDefinitionVersion:
type: string
description: The effective version of the policy definition in use. This is only present if requested via the $expand query parameter.
readOnly: true
parameters:
description: The parameter values for the referenced policy rule. The keys are the parameter names.
$ref: '#/components/schemas/ParameterValues'
policyDefinitionReferenceId:
type: string
description: A unique id (within the policy set definition) for this policy definition reference.
groupNames:
type: array
items:
type: string
description: The name of the groups that this policy definition reference belongs to.
required:
- policyDefinitionId
description: The policy definition reference.
CloudError:
type: object
x-ms-external: true
properties:
error:
$ref: '#/components/schemas/ErrorResponse'
description: An error response from a policy operation.
PolicySetDefinitionProperties:
type: object
properties:
policyType:
type: string
description: The type of policy set definition. Possible values are NotSpecified, BuiltIn, Custom, and Static.
enum:
- NotSpecified
- BuiltIn
- Custom
- Static
x-ms-enum:
name: policyType
modelAsString: true
displayName:
type: string
description: The display name of the policy set definition.
description:
type: string
description: The policy set definition description.
metadata:
type: object
description: The policy set definition metadata. Metadata is an open ended object and is typically a collection of key value pairs.
parameters:
description: The policy set definition parameters that can be used in policy definition references.
$ref: '#/components/schemas/ParameterDefinitions'
policyDefinitions:
type: array
items:
$ref: '#/components/schemas/PolicyDefinitionReference'
x-ms-identifiers:
- policyDefinitionReferenceId
description: An array of policy definition references.
policyDefinitionGroups:
type: array
items:
$ref: '#/components/schemas/PolicyDefinitionGroup'
x-ms-identifiers:
- name
description: The metadata describing groups of policy definition references within the policy set definition.
version:
type: string
description: 'The policy set definition version in #.#.# format.'
versions:
type: array
items:
type: string
description: A list of available versions for this policy set definition.
required:
- policyDefinitions
description: The policy set definition properties.
parameters:
TopParameter:
name: $top
in: query
required: false
description: Maximum number of records to return. When the $top filter is not provided, it will return 500 records.
x-ms-parameter-location: method
schema:
type: integer
format: int32
maximum: 1000
minimum: 1
ManagementGroupIdParameter:
name: managementGroupId
in: path
required: true
description: The ID of the management group.
x-ms-parameter-location: method
schema:
type: string
PolicySetDefinitionsExpandParameter:
name: $expand
in: query
required: false
description: Comma-separated list of additional properties to be included in the response. Supported values are 'LatestDefinitionVersion, EffectiveDefinitionVersion'.
x-ms-parameter-location: method
schema:
type: string
PolicySetDefinitionsFilterParameter:
name: $filter
in: query
required: false
description: 'The filter to apply on the operation. Valid values for $filter are: ''atExactScope()'', ''policyType -eq {value}'' or ''category eq ''{value}''''. If $filter is not provided, no filtering is performed. If $filter=atExactScope() is provided, the returned list only includes all policy set definitions that at the given scope. If $filter=''policyType -eq {value}'' is provided, the returned list only includes all policy set definitions whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If $filter=''category -eq {value}'' is provided, the returned list only includes all policy set definitions whose category match the {value}.'
x-ms-skip-url-encoding: true
x-ms-parameter-location: method
schema:
type: string
SubscriptionIdParameter:
name: subscriptionId
in: path
description: The ID of the target subscription. The value must be an UUID.
required: true
schema:
type: string
format: uuid
ApiVersionParameter:
name: api-version
in: query
description: The API version to use for this operation.
required: true
schema:
type: string
minLength: 1
securitySchemes:
azure_auth:
type: oauth2
flows:
implicit:
scopes:
user_impersonation: impersonate your user account
authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
description: Azure Active Directory OAuth2 Flow.