Share via


Microsoft.Authorization policyDefinitions/versions 2025-03-01

Bicep resource definition

The policyDefinitions/versions resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Authorization/policyDefinitions/versions resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.Authorization/policyDefinitions/versions@2025-03-01' = {
  parent: resourceSymbolicName
  name: 'string'
  properties: {
    description: 'string'
    displayName: 'string'
    externalEvaluationEnforcementSettings: {
      endpointSettings: {
        details: any(...)
        kind: 'string'
      }
      missingTokenAction: 'string'
      resultLifespan: 'string'
      roleDefinitionIds: [
        'string'
      ]
    }
    metadata: any(...)
    mode: 'string'
    parameters: {
      {customized property}: {
        allowedValues: [
          any(...)
        ]
        defaultValue: any(...)
        metadata: {
          assignPermissions: bool
          description: 'string'
          displayName: 'string'
          strongType: 'string'
        }
        schema: any(...)
        type: 'string'
      }
    }
    policyRule: any(...)
    policyType: 'string'
    version: 'string'
  }
}

Property Values

Microsoft.Authorization/policyDefinitions/versions

Name Description Value
name The resource name string

Constraints:
Pattern = ^\d+\.\d+\.\d+$ (required)
parent In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.

For more information, see Child resource outside parent resource.
Symbolic name for resource of type: policyDefinitions
properties The policy definition version properties. PolicyDefinitionVersionProperties

ExternalEvaluationEndpointSettings

Name Description Value
details The details of the endpoint. any
kind The kind of the endpoint. string

ExternalEvaluationEnforcementSettings

Name Description Value
endpointSettings The settings of an external endpoint providing evaluation results. ExternalEvaluationEndpointSettings
missingTokenAction What to do when evaluating an enforcement policy that requires an external evaluation and the token is missing. Possible values are Audit and Deny and language expressions are supported. string
resultLifespan The lifespan of the endpoint invocation result after which it's no longer valid. Value is expected to follow the ISO 8601 duration format and language expressions are supported. string
roleDefinitionIds An array of the role definition Ids the assignment's MSI will need in order to invoke the endpoint. string[]

ParameterDefinitions

Name Description Value

ParameterDefinitionsValue

Name Description Value
allowedValues The allowed values for the parameter. any[]
defaultValue The default value for the parameter if no value is provided. any
metadata General metadata for the parameter. ParameterDefinitionsValueMetadata
schema Provides validation of parameter inputs during assignment using a self-defined JSON schema. This property is only supported for object-type parameters and follows the Json.NET Schema 2019-09 implementation. You can learn more about using schemas at https://json-schema.org/ and test draft schemas at https://www.jsonschemavalidator.net/. any
type The data type of the parameter. 'Array'
'Boolean'
'DateTime'
'Float'
'Integer'
'Object'
'String'

ParameterDefinitionsValueMetadata

Name Description Value
assignPermissions Set to true to have Azure portal create role assignments on the resource ID or resource scope value of this parameter during policy assignment. This property is useful in case you wish to assign permissions outside the assignment scope. bool
description The description of the parameter. string
displayName The display name for the parameter. string
strongType Used when assigning the policy definition through the portal. Provides a context aware list of values for the user to choose from. string

PolicyDefinitionVersionProperties

Name Description Value
description The policy definition description. string
displayName The display name of the policy definition. string
externalEvaluationEnforcementSettings The details of the source of external evaluation results required by the policy during enforcement evaluation. ExternalEvaluationEnforcementSettings
metadata The policy definition metadata. Metadata is an open ended object and is typically a collection of key value pairs. any
mode The policy definition mode. Some examples are All, Indexed, Microsoft.KeyVault.Data. string
parameters The parameter definitions for parameters used in the policy rule. The keys are the parameter names. ParameterDefinitions
policyRule The policy rule. any
policyType The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static. 'BuiltIn'
'Custom'
'NotSpecified'
'Static'
version The policy definition version in #.#.# format. string

ARM template resource definition

The policyDefinitions/versions resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Authorization/policyDefinitions/versions resource, add the following JSON to your template.

{
  "type": "Microsoft.Authorization/policyDefinitions/versions",
  "apiVersion": "2025-03-01",
  "name": "string",
  "properties": {
    "description": "string",
    "displayName": "string",
    "externalEvaluationEnforcementSettings": {
      "endpointSettings": {
        "details": {},
        "kind": "string"
      },
      "missingTokenAction": "string",
      "resultLifespan": "string",
      "roleDefinitionIds": [ "string" ]
    },
    "metadata": {},
    "mode": "string",
    "parameters": {
      "{customized property}": {
        "allowedValues": [ {} ],
        "defaultValue": {},
        "metadata": {
          "assignPermissions": "bool",
          "description": "string",
          "displayName": "string",
          "strongType": "string"
        },
        "schema": {},
        "type": "string"
      }
    },
    "policyRule": {},
    "policyType": "string",
    "version": "string"
  }
}

Property Values

Microsoft.Authorization/policyDefinitions/versions

Name Description Value
apiVersion The api version '2025-03-01'
name The resource name string

Constraints:
Pattern = ^\d+\.\d+\.\d+$ (required)
properties The policy definition version properties. PolicyDefinitionVersionProperties
type The resource type 'Microsoft.Authorization/policyDefinitions/versions'

ExternalEvaluationEndpointSettings

Name Description Value
details The details of the endpoint. any
kind The kind of the endpoint. string

ExternalEvaluationEnforcementSettings

Name Description Value
endpointSettings The settings of an external endpoint providing evaluation results. ExternalEvaluationEndpointSettings
missingTokenAction What to do when evaluating an enforcement policy that requires an external evaluation and the token is missing. Possible values are Audit and Deny and language expressions are supported. string
resultLifespan The lifespan of the endpoint invocation result after which it's no longer valid. Value is expected to follow the ISO 8601 duration format and language expressions are supported. string
roleDefinitionIds An array of the role definition Ids the assignment's MSI will need in order to invoke the endpoint. string[]

ParameterDefinitions

Name Description Value

ParameterDefinitionsValue

Name Description Value
allowedValues The allowed values for the parameter. any[]
defaultValue The default value for the parameter if no value is provided. any
metadata General metadata for the parameter. ParameterDefinitionsValueMetadata
schema Provides validation of parameter inputs during assignment using a self-defined JSON schema. This property is only supported for object-type parameters and follows the Json.NET Schema 2019-09 implementation. You can learn more about using schemas at https://json-schema.org/ and test draft schemas at https://www.jsonschemavalidator.net/. any
type The data type of the parameter. 'Array'
'Boolean'
'DateTime'
'Float'
'Integer'
'Object'
'String'

ParameterDefinitionsValueMetadata

Name Description Value
assignPermissions Set to true to have Azure portal create role assignments on the resource ID or resource scope value of this parameter during policy assignment. This property is useful in case you wish to assign permissions outside the assignment scope. bool
description The description of the parameter. string
displayName The display name for the parameter. string
strongType Used when assigning the policy definition through the portal. Provides a context aware list of values for the user to choose from. string

PolicyDefinitionVersionProperties

Name Description Value
description The policy definition description. string
displayName The display name of the policy definition. string
externalEvaluationEnforcementSettings The details of the source of external evaluation results required by the policy during enforcement evaluation. ExternalEvaluationEnforcementSettings
metadata The policy definition metadata. Metadata is an open ended object and is typically a collection of key value pairs. any
mode The policy definition mode. Some examples are All, Indexed, Microsoft.KeyVault.Data. string
parameters The parameter definitions for parameters used in the policy rule. The keys are the parameter names. ParameterDefinitions
policyRule The policy rule. any
policyType The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static. 'BuiltIn'
'Custom'
'NotSpecified'
'Static'
version The policy definition version in #.#.# format. string

Usage Examples

Terraform (AzAPI provider) resource definition

The policyDefinitions/versions resource type can be deployed with operations that target:

  • Tenant* Management groups* Subscription

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Authorization/policyDefinitions/versions resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Authorization/policyDefinitions/versions@2025-03-01"
  name = "string"
  parent_id = "string"
  body = {
    properties = {
      description = "string"
      displayName = "string"
      externalEvaluationEnforcementSettings = {
        endpointSettings = {
          details = ?
          kind = "string"
        }
        missingTokenAction = "string"
        resultLifespan = "string"
        roleDefinitionIds = [
          "string"
        ]
      }
      metadata = ?
      mode = "string"
      parameters = {
        {customized property} = {
          allowedValues = [
            ?
          ]
          defaultValue = ?
          metadata = {
            assignPermissions = bool
            description = "string"
            displayName = "string"
            strongType = "string"
          }
          schema = ?
          type = "string"
        }
      }
      policyRule = ?
      policyType = "string"
      version = "string"
    }
  }
}

Property Values

Microsoft.Authorization/policyDefinitions/versions

Name Description Value
name The resource name string

Constraints:
Pattern = ^\d+\.\d+\.\d+$ (required)
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: policyDefinitions
properties The policy definition version properties. PolicyDefinitionVersionProperties
type The resource type "Microsoft.Authorization/policyDefinitions/versions@2025-03-01"

ExternalEvaluationEndpointSettings

Name Description Value
details The details of the endpoint. any
kind The kind of the endpoint. string

ExternalEvaluationEnforcementSettings

Name Description Value
endpointSettings The settings of an external endpoint providing evaluation results. ExternalEvaluationEndpointSettings
missingTokenAction What to do when evaluating an enforcement policy that requires an external evaluation and the token is missing. Possible values are Audit and Deny and language expressions are supported. string
resultLifespan The lifespan of the endpoint invocation result after which it's no longer valid. Value is expected to follow the ISO 8601 duration format and language expressions are supported. string
roleDefinitionIds An array of the role definition Ids the assignment's MSI will need in order to invoke the endpoint. string[]

ParameterDefinitions

Name Description Value

ParameterDefinitionsValue

Name Description Value
allowedValues The allowed values for the parameter. any[]
defaultValue The default value for the parameter if no value is provided. any
metadata General metadata for the parameter. ParameterDefinitionsValueMetadata
schema Provides validation of parameter inputs during assignment using a self-defined JSON schema. This property is only supported for object-type parameters and follows the Json.NET Schema 2019-09 implementation. You can learn more about using schemas at https://json-schema.org/ and test draft schemas at https://www.jsonschemavalidator.net/. any
type The data type of the parameter. 'Array'
'Boolean'
'DateTime'
'Float'
'Integer'
'Object'
'String'

ParameterDefinitionsValueMetadata

Name Description Value
assignPermissions Set to true to have Azure portal create role assignments on the resource ID or resource scope value of this parameter during policy assignment. This property is useful in case you wish to assign permissions outside the assignment scope. bool
description The description of the parameter. string
displayName The display name for the parameter. string
strongType Used when assigning the policy definition through the portal. Provides a context aware list of values for the user to choose from. string

PolicyDefinitionVersionProperties

Name Description Value
description The policy definition description. string
displayName The display name of the policy definition. string
externalEvaluationEnforcementSettings The details of the source of external evaluation results required by the policy during enforcement evaluation. ExternalEvaluationEnforcementSettings
metadata The policy definition metadata. Metadata is an open ended object and is typically a collection of key value pairs. any
mode The policy definition mode. Some examples are All, Indexed, Microsoft.KeyVault.Data. string
parameters The parameter definitions for parameters used in the policy rule. The keys are the parameter names. ParameterDefinitions
policyRule The policy rule. any
policyType The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static. 'BuiltIn'
'Custom'
'NotSpecified'
'Static'
version The policy definition version in #.#.# format. string