Share via


Policy Events - Next Link

Subsequent post calls to the next link

POST https://management.azure.com{nextLink}?Next paging op for policy events&api-version=2019-10-01
POST https://management.azure.com{nextLink}?Next paging op for policy events&api-version=2019-10-01&$skiptoken={$skiptoken}

URI Parameters

Name In Required Type Description
nextLink
path True

string

Next link for list operation.

api-version
query True

string

Client Api Version.

$skiptoken
query

string

Skiptoken is only provided if a previous response returned a partial result as a part of nextLink element.

Responses

Name Type Description
200 OK

PolicyEventsQueryResults

Query results.

Other Status Codes

QueryFailure

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

Sample request

POST https://management.azure.com{nextLink}?Next paging op for policy events&api-version=2019-10-01&$skiptoken=WpmWfBSvPhkAK6QD

Sample response

{
  "@odata.nextLink": null,
  "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default",
  "@odata.count": 2,
  "value": [
    {
      "@odata.id": null,
      "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity",
      "timestamp": "2018-02-07T22:19:18.8896095Z",
      "resourceId": "/subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myrg/providers/Microsoft.Compute/virtualMachines/myvm1/extensions/DAExtension",
      "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/1ef5d536aec743a0aa801c1a",
      "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d",
      "effectiveParameters": null,
      "isCompliant": false,
      "subscriptionId": "fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef",
      "resourceType": "/Microsoft.Compute/virtualMachines/extensions",
      "resourceLocation": "westeurope",
      "resourceGroup": "myrg",
      "resourceTags": "tbd",
      "policyAssignmentName": "1ef5d536aec743a0aa801c1a",
      "policyAssignmentOwner": "tbd",
      "policyAssignmentParameters": "{}",
      "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup",
      "policyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d",
      "policyDefinitionAction": "audit",
      "policyDefinitionCategory": "tbd",
      "policySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/335cefd2-ab16-430f-b364-974a170eb1d5",
      "policySetDefinitionName": "335cefd2-ab16-430f-b364-974a170eb1d5",
      "policySetDefinitionOwner": null,
      "policySetDefinitionCategory": null,
      "policySetDefinitionParameters": null,
      "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47",
      "policyDefinitionReferenceId": "15521232277412542086",
      "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47",
      "principalOid": "fff3e452-fff2-fff1-fff8-fff12618f1b8",
      "complianceState": "NonCompliant"
    },
    {
      "@odata.id": null,
      "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity",
      "timestamp": "2018-02-07T22:19:18.8896095Z",
      "resourceId": "/subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myrg/providers/Microsoft.Compute/virtualMachines/myvm1/extensions/DAExtension",
      "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/95816fce53454b15a7ed803d",
      "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/a2c0414b-82e4-459d-97d5-94c79a89232c",
      "effectiveParameters": null,
      "isCompliant": false,
      "subscriptionId": "fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef",
      "resourceType": "/Microsoft.Compute/virtualMachines/extensions",
      "resourceLocation": "westeurope",
      "resourceGroup": "myrg",
      "resourceTags": "tbd",
      "policyAssignmentName": "95816fce53454b15a7ed803d",
      "policyAssignmentOwner": "tbd",
      "policyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"eastus\"]}}",
      "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup",
      "policyDefinitionName": "a2c0414b-82e4-459d-97d5-94c79a89232c",
      "policyDefinitionAction": "audit",
      "policyDefinitionCategory": "tbd",
      "policySetDefinitionId": "",
      "policySetDefinitionName": "",
      "policySetDefinitionOwner": null,
      "policySetDefinitionCategory": null,
      "policySetDefinitionParameters": null,
      "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47",
      "policyDefinitionReferenceId": "",
      "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47",
      "principalOid": "fff3e452-fff2-fff1-fff8-fff12618f1b8",
      "complianceState": "NonCompliant"
    }
  ]
}

Definitions

Name Description
ComponentEventDetails

Component event details.

Error

Error definition.

PolicyEvent

Policy event record.

PolicyEventsQueryResults

Query results.

QueryFailure

Error response.

ComponentEventDetails

Component event details.

Name Type Description
id

string

Component Id.

name

string

Component name.

policyDefinitionAction

string

Policy definition action, i.e. effect.

principalOid

string

Principal object ID for the user who initiated the resource component operation that triggered the policy event.

tenantId

string

Tenant ID for the policy event record.

timestamp

string

Timestamp for component policy event record.

type

string

Component type.

Error

Error definition.

Name Type Description
code

string

Service specific error code which serves as the substatus for the HTTP error code.

message

string

Description of the error.

PolicyEvent

Policy event record.

Name Type Description
@odata.context

string

OData context string; used by OData clients to resolve type information based on metadata.

@odata.id

string

OData entity ID; always set to null since policy event records do not have an entity ID.

complianceState

string

Compliance state of the resource.

components

ComponentEventDetails[]

Components events records populated only when URL contains $expand=components clause.

effectiveParameters

string

Effective parameters for the policy assignment.

isCompliant

boolean

Flag which states whether the resource is compliant against the policy assignment it was evaluated against.

managementGroupIds

string

Comma separated list of management group IDs, which represent the hierarchy of the management groups the resource is under.

policyAssignmentId

string

Policy assignment ID.

policyAssignmentName

string

Policy assignment name.

policyAssignmentOwner

string

Policy assignment owner.

policyAssignmentParameters

string

Policy assignment parameters.

policyAssignmentScope

string

Policy assignment scope.

policyDefinitionAction

string

Policy definition action, i.e. effect.

policyDefinitionCategory

string

Policy definition category.

policyDefinitionId

string

Policy definition ID.

policyDefinitionName

string

Policy definition name.

policyDefinitionReferenceId

string

Reference ID for the policy definition inside the policy set, if the policy assignment is for a policy set.

policySetDefinitionCategory

string

Policy set definition category, if the policy assignment is for a policy set.

policySetDefinitionId

string

Policy set definition ID, if the policy assignment is for a policy set.

policySetDefinitionName

string

Policy set definition name, if the policy assignment is for a policy set.

policySetDefinitionOwner

string

Policy set definition owner, if the policy assignment is for a policy set.

policySetDefinitionParameters

string

Policy set definition parameters, if the policy assignment is for a policy set.

principalOid

string

Principal object ID for the user who initiated the resource operation that triggered the policy event.

resourceGroup

string

Resource group name.

resourceId

string

Resource ID.

resourceLocation

string

Resource location.

resourceTags

string

List of resource tags.

resourceType

string

Resource type.

subscriptionId

string

Subscription ID.

tenantId

string

Tenant ID for the policy event record.

timestamp

string

Timestamp for the policy event record.

PolicyEventsQueryResults

Query results.

Name Type Description
@odata.context

string

OData context string; used by OData clients to resolve type information based on metadata.

@odata.count

integer

OData entity count; represents the number of policy event records returned.

@odata.nextLink

string

Odata next link; URL to get the next set of results.

value

PolicyEvent[]

Query results.

QueryFailure

Error response.

Name Type Description
error

Error

Error definition.