Standard Assignments - Create

This operation creates or updates a standard assignment with the given scope and name. standard assignments apply to all resources contained within their scope. For example, when you assign a policy at resource group scope, that policy applies to all resources in the group.

PUT https://management.azure.com/{resourceId}/providers/Microsoft.Security/standardAssignments/{standardAssignmentName}?api-version=2024-08-01

URI Parameters

Name In Required Type Description
resourceId
path True

string

The fully qualified Azure Resource manager identifier of the resource.

standardAssignmentName
path True

string

pattern: [{]?[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}[}]?$

The standard assignments assignment key - unique key for the standard assignment

api-version
query True

string

minLength: 1

The API version to use for this operation.

Request Body

Name Type Description
properties.assignedStandard

Common.AssignedStandardItem

Standard item with key as applied to this standard assignment over the given scope

properties.attestationData

StandardAssignmentPropertiesAttestationData

Additional data about assignment that has Attest effect

properties.description

string

Description of the standardAssignment

properties.displayName

string

Display name of the standardAssignment

properties.effect

Effect

Expected effect of this assignment (Audit/Exempt/Attest)

properties.excludedScopes

string[]

Excluded scopes, filter out the descendants of the scope (on management scopes)

properties.exemptionData

StandardAssignmentPropertiesExemptionData

Additional data about assignment that has Exempt effect

properties.expiresOn

string (date-time)

Expiration date of this assignment as a full ISO date

properties.metadata

StandardAssignmentMetadata

The standard assignment metadata.

Responses

Name Type Description
200 OK

StandardAssignment

Resource 'StandardAssignment' update operation succeeded

201 Created

StandardAssignment

Resource 'StandardAssignment' create operation succeeded

Other Status Codes

ErrorResponse

An unexpected error response.

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

Put an audit standard assignment
Put exemption standard assignment

Put an audit standard assignment

Sample request

PUT https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/standardAssignments/1f3afdf9-d0c9-4c3d-847f-89da613e70a8?api-version=2024-08-01

{
  "properties": {
    "description": "Set of policies monitored by Azure Security Center for cross cloud",
    "assignedStandard": {
      "id": "/providers/Microsoft.Security/securityStandards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8"
    },
    "displayName": "ASC Default",
    "effect": "Audit",
    "excludedScopes": []
  }
}

Sample response

{
  "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8",
  "type": "Microsoft.Security/standardAssignments",
  "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/standardAssignments/1f3afdf9-d0c9-4c3d-847f-89da613e70a8",
  "properties": {
    "description": "Set of policies monitored by Azure Security Center for cross cloud",
    "assignedStandard": {
      "id": "/providers/Microsoft.Security/securityStandards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8"
    },
    "displayName": "ASC Default",
    "effect": "Audit",
    "excludedScopes": [],
    "metadata": {
      "createdBy": "c23b5354-ff0a-4b2a-9f92-6f144effd936",
      "createdOn": "2022-11-10T08:31:26.7993124Z",
      "lastUpdatedBy": "c23b5354-ff0a-4b2a-9f92-6f144effd936",
      "lastUpdatedOn": "2022-11-10T08:31:26.7993124Z"
    }
  }
}
{
  "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8",
  "type": "Microsoft.Security/standardAssignments",
  "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/standardAssignments/1f3afdf9-d0c9-4c3d-847f-89da613e70a8",
  "properties": {
    "description": "Set of policies monitored by Azure Security Center for cross cloud",
    "assignedStandard": {
      "id": "/providers/Microsoft.Security/securityStandards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8"
    },
    "displayName": "ASC Default",
    "effect": "Audit",
    "excludedScopes": [],
    "metadata": {
      "createdBy": "c23b5354-ff0a-4b2a-9f92-6f144effd936",
      "createdOn": "2022-11-10T08:31:26.7993124Z",
      "lastUpdatedBy": "c23b5354-ff0a-4b2a-9f92-6f144effd936",
      "lastUpdatedOn": "2022-11-10T08:31:26.7993124Z"
    }
  }
}

Put exemption standard assignment

Sample request

PUT https://management.azure.com/subscriptions/212f9889-769e-45ae-ab43-6da33674bd26/resourceGroups/ANAT_TEST_RG/providers/Microsoft.Compute/virtualMachines/anatTestE2LA/providers/Microsoft.Security/standardAssignments/1f3afdf9-d0c9-4c3d-847f-89da613e70a8?api-version=2024-08-01

{
  "properties": {
    "description": "Exemption description",
    "assignedStandard": {
      "id": "/providers/Microsoft.Security/securityStandards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8"
    },
    "displayName": "Test exemption",
    "effect": "Exempt",
    "exemptionData": {
      "assignedAssessment": {
        "assessmentKey": "1195afff-c881-495e-9bc5-1486211ae03f"
      },
      "exemptionCategory": "waiver"
    },
    "expiresOn": "2022-05-01T19:50:47.083633Z"
  }
}

Sample response

{
  "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8",
  "type": "Microsoft.Security/standardAssignments",
  "id": "/subscriptions/212f9889-769e-45ae-ab43-6da33674bd26/resourceGroups/ANAT_TEST_RG/providers/Microsoft.Compute/virtualMachines/anatTestE2LA/providers/Microsoft.Security/standardAssignments/1f3afdf9-d0c9-4c3d-847f-89da613e70a8",
  "properties": {
    "description": "Exemption description",
    "assignedStandard": {
      "id": "/providers/Microsoft.Security/securityStandards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8"
    },
    "displayName": "Test exemption",
    "effect": "Exempt",
    "exemptionData": {
      "assignedAssessment": {
        "assessmentKey": "1195afff-c881-495e-9bc5-1486211ae03f"
      },
      "exemptionCategory": "waiver"
    },
    "expiresOn": "2022-05-01T19:50:47.083633Z",
    "metadata": {
      "createdBy": "c23b5354-ff0a-4b2a-9f92-6f144effd936",
      "createdOn": "2022-11-10T08:31:26.7993124Z",
      "lastUpdatedBy": "c23b5354-ff0a-4b2a-9f92-6f144effd936",
      "lastUpdatedOn": "2022-11-10T08:31:26.7993124Z"
    }
  }
}
{
  "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8",
  "type": "Microsoft.Security/standardAssignments",
  "id": "/subscriptions/212f9889-769e-45ae-ab43-6da33674bd26/resourceGroups/ANAT_TEST_RG/providers/Microsoft.Compute/virtualMachines/anatTestE2LA/providers/Microsoft.Security/standardAssignments/1f3afdf9-d0c9-4c3d-847f-89da613e70a8",
  "properties": {
    "description": "Exemption description",
    "assignedStandard": {
      "id": "/providers/Microsoft.Security/securityStandards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8"
    },
    "displayName": "Test exemption",
    "effect": "Exempt",
    "exemptionData": {
      "assignedAssessment": {
        "assessmentKey": "1195afff-c881-495e-9bc5-1486211ae03f"
      },
      "exemptionCategory": "waiver"
    },
    "expiresOn": "2022-05-01T19:50:47.083633Z",
    "metadata": {
      "createdBy": "c23b5354-ff0a-4b2a-9f92-6f144effd936",
      "createdOn": "2022-11-10T08:31:26.7993124Z",
      "lastUpdatedBy": "c23b5354-ff0a-4b2a-9f92-6f144effd936",
      "lastUpdatedOn": "2022-11-10T08:31:26.7993124Z"
    }
  }
}

Definitions

Name Description
AssignedAssessmentItem

Describe the properties of a security assessment object reference (by key)

attestationComplianceState

Attest category of this assignment

AttestationEvidence

Describe the properties of a assignment attestation

Common.AssignedStandardItem

Describe the properties of a of a standard assignments object reference

createdByType

The type of identity that created the resource.

Effect

Expected effect of this assignment (Audit/Exempt/Attest)

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

ExemptionCategory

Exemption category of this assignment

StandardAssignment

Security Assignment on a resource group over a given scope

StandardAssignmentMetadata

The standard assignment metadata

StandardAssignmentPropertiesAttestationData

Additional data about assignment that has Attest effect

StandardAssignmentPropertiesExemptionData

Additional data about assignment that has Exempt effect

systemData

Metadata pertaining to creation and last modification of the resource.

AssignedAssessmentItem

Describe the properties of a security assessment object reference (by key)

Name Type Description
assessmentKey

string

Unique key to a security assessment object

attestationComplianceState

Attest category of this assignment

Value Description
unknown

unknown

compliant

compliant

nonCompliant

nonCompliant

AttestationEvidence

Describe the properties of a assignment attestation

Name Type Description
description

string

The description of the evidence

sourceUrl

string

The source url of the evidence

Common.AssignedStandardItem

Describe the properties of a of a standard assignments object reference

Name Type Description
id

string

Full resourceId of the Microsoft.Security/standard object

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

Effect

Expected effect of this assignment (Audit/Exempt/Attest)

Value Description
Audit

Audit

Exempt

Exempt

Attest

Attest

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

ExemptionCategory

Exemption category of this assignment

Value Description
waiver

waiver

mitigated

mitigated

StandardAssignment

Security Assignment on a resource group over a given scope

Name Type Description
id

string (arm-id)

Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

name

string

The name of the resource

properties.assignedStandard

Common.AssignedStandardItem

Standard item with key as applied to this standard assignment over the given scope

properties.attestationData

StandardAssignmentPropertiesAttestationData

Additional data about assignment that has Attest effect

properties.description

string

Description of the standardAssignment

properties.displayName

string

Display name of the standardAssignment

properties.effect

Effect

Expected effect of this assignment (Audit/Exempt/Attest)

properties.excludedScopes

string[]

Excluded scopes, filter out the descendants of the scope (on management scopes)

properties.exemptionData

StandardAssignmentPropertiesExemptionData

Additional data about assignment that has Exempt effect

properties.expiresOn

string (date-time)

Expiration date of this assignment as a full ISO date

properties.metadata

StandardAssignmentMetadata

The standard assignment metadata.

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

StandardAssignmentMetadata

The standard assignment metadata

Name Type Description
createdBy

string

Standard assignment Created by object id (GUID)

createdOn

string (date-time)

Standard assignment creation date

lastUpdatedBy

string

Standard assignment last updated by object id (GUID)

lastUpdatedOn

string (date-time)

Standard assignment last update date

StandardAssignmentPropertiesAttestationData

Additional data about assignment that has Attest effect

Name Type Description
assignedAssessment

AssignedAssessmentItem

Component item with key as applied to this standard assignment over the given scope

complianceDate

string (date-time)

Attestation compliance date

complianceState

attestationComplianceState

Attest category of this assignment

evidence

AttestationEvidence[]

Array of links to attestation evidence

StandardAssignmentPropertiesExemptionData

Additional data about assignment that has Exempt effect

Name Type Description
assignedAssessment

AssignedAssessmentItem

Component item with key as applied to this standard assignment over the given scope

exemptionCategory

ExemptionCategory

Exemption category of this assignment

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string (date-time)

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.