The Azure Activity log provides insight into any subscription-level events that occurred in Azure. This article describes Activity log categories and the schema for each.
The schema varies depending on how you access the log:
The schemas described in this article are when you access the Activity log from the REST API. The schema is also used when you select the JSON option when viewing an event in the Azure portal.
Each entry in the activity log has a severity level. Severity level can have one of the following values:
Severity
Description
Critical
Events that demand the immediate attention of a system administrator. Might indicate that an application or system failed or stopped responding.
Error
Events that indicate a problem, but don't require immediate attention.
Warning
Events that provide forewarning of potential problems, although not an actual error. Indicate that a resource isn't in an ideal state and may degrade later into showing errors or critical events.
Informational
Events that pass noncritical information to the administrator. Similar to a note that says: "For your information".
The developers of each resource provider choose the severity levels of their resource entries. As a result, the actual severity to you can vary depending on how your application is built. For example, items that are "critical" to a particular resource taken in isolation might not be as important as "errors" in a resource type that is central to your Azure application. Be sure to consider this fact when deciding what events to alert on.
Categories
Each event in the Activity Log has a particular category that is described in the following table. See the sections below for more detail on each category and its schema when you access the Activity log from the portal, PowerShell, CLI, and REST API. The schema is different when you stream the Activity log to storage or Event Hubs. A mapping of the properties to the resource logs schema is provided in the last section of the article.
Contains the record of all create, update, delete, and action operations performed through Resource Manager. Examples of Administrative events include create virtual machine and delete network security group.
Every action taken by a user or application using Resource Manager is modeled as an operation on a particular resource type. If the operation type is Write, Delete, or Action, the records of both the start and success or fail of that operation are recorded in the Administrative category. Administrative events also include any changes to Azure role-based access control in a subscription.
Contains the record of any service health incidents that occurred in Azure. An example of a Service Health event SQL Azure in East US is experiencing downtime.
Service Health events come in Six varieties: Action Required, Assisted Recovery, Incident, Maintenance, Information, or Security. These events are only created if you have a resource in the subscription impacted by the event.
Contains the record of any resource health events that occurred to your Azure resources. An example of a Resource Health event is Virtual Machine health status changed to unavailable.
Resource Health events can represent one of four health statuses: Available, Unavailable, Degraded, and Unknown. Additionally, Resource Health events can be categorized as being Platform Initiated or User Initiated.
Contains the record of any events related to the operation of the autoscale engine based on any autoscale settings you defined in your subscription. An example of an Autoscale event is Autoscale scale up action failed.
Contains the record of any alerts generated by Microsoft Defender for Cloud. An example of a Security event is Suspicious double extension file executed.
Contains records of all effect action operations performed by Azure Policy. Examples of Policy events include Audit and Deny. Every action taken by Policy is modeled as an operation on a resource.
Administrative category
This category contains the record of all create, update, delete, and action operations performed through Resource Manager. Examples of the types of events you would see in this category include "create virtual machine" and "delete network security group". Every action taken by a user or application using Resource Manager is modeled as an operation on a particular resource type. If the operation type is Write, Delete, or Action, the records of both the start and success or fail of that operation are recorded in the Administrative category. The Administrative category also includes any changes to Azure role-based access control in a subscription.
Name of the resource group for the impacted resource.
resourceProviderName
Name of the resource provider for the impacted resource
resourceType
The type of resource affected by an Administrative event.
resourceId
Resource ID of the impacted resource.
operationId
A GUID shared among the events that correspond to a single operation.
operationName
Name of the operation.
properties
Set of <Key, Value> pairs (that is, a Dictionary) describing the details of the event.
status
String describing the status of the operation. Some common values are: Started, In Progress, Succeeded, Failed, Active, Resolved.
subStatus
Usually the HTTP status code of the corresponding REST call, but can also include other strings describing a subStatus, such as these common values: OK (HTTP Status Code: 200), Created (HTTP Status Code: 201), Accepted (HTTP Status Code: 202), No Content (HTTP Status Code: 204), Bad Request (HTTP Status Code: 400), Not Found (HTTP Status Code: 404), Conflict (HTTP Status Code: 409), Internal Server Error (HTTP Status Code: 500), Service Unavailable (HTTP Status Code: 503), Gateway Timeout (HTTP Status Code: 504).
eventTimestamp
Timestamp when the event was generated by the Azure service processing the request corresponding the event.
submissionTimestamp
Timestamp when the event became available for querying.
subscriptionId
Azure Subscription ID.
Service health category
This category contains the record of any service health incidents that occurred in Azure. An example of the type of event you would see in this category is "SQL Azure in East US is experiencing downtime." Service health events come in five varieties: Action Required, Incident, Maintenance, Information, or Security, and only appear if you have a resource in the subscription that would be impacted by the event.
Sample event
JSON
{
"channels": "Admin",
"correlationId": "bbbb1111-cc22-3333-44dd-555555eeeeee",
"description": "Active: Network Infrastructure - UK South",
"eventDataId": "bbbb1b1b-cc2c-dd3d-ee4e-ffffff5f5f5f",
"eventName": {
"value": null
},
"category": {
"value": "ServiceHealth",
"localizedValue": "Service Health"
},
"eventTimestamp": "2017-07-20T23:30:14.8022297Z",
"id": "/subscriptions/<subscription ID>/events/bbbb1b1b-cc2c-dd3d-ee4e-ffffff5f5f5f/ticks/636361902148022297",
"level": "Warning",
"operationName": {
"value": "Microsoft.ServiceHealth/incident/action",
"localizedValue": "Microsoft.ServiceHealth/incident/action"
},
"resourceProviderName": {
"value": null
},
"resourceType": {
"value": null,
"localizedValue": ""
},
"resourceId": "/subscriptions/<subscription ID>",
"status": {
"value": "Active",
"localizedValue": "Active"
},
"subStatus": {
"value": null
},
"submissionTimestamp": "2017-07-20T23:30:34.7431946Z",
"subscriptionId": "<subscription ID>",
"properties": {
"title": "Network Infrastructure - UK South",
"service": "Service Fabric",
"region": "UK South",
"communication": "Starting at approximately 21:41 UTC on 20 Jul 2017, a subset of customers in UK South may experience degraded performance, connectivity drops or timeouts when accessing their Azure resources hosted in this region. Engineers are investigating underlying Network Infrastructure issues in this region. Impacted services may include, but are not limited to App Services, Automation, Service Bus, Log Analytics, Key Vault, SQL Database, Service Fabric, Event Hubs, Stream Analytics, Azure Data Movement, API Management, and Azure Cognitive Search. Multiple engineering teams are engaged in multiple workflows to mitigate the impact. The next update will be provided in 60 minutes, or as events warrant.",
"incidentType": "Incident",
"trackingId": "NA0F-BJG",
"impactStartTime": "2017-07-20T21:41:00.0000000Z",
"impactedServices": "[{\"ImpactedRegions\":[{\"RegionName\":\"UK South\"}],\"ServiceName\":\"Service Fabric\"}]",
"defaultLanguageTitle": "Network Infrastructure - UK South",
"defaultLanguageContent": "Starting at approximately 21:41 UTC on 20 Jul 2017, a subset of customers in UK South may experience degraded performance, connectivity drops or timeouts when accessing their Azure resources hosted in this region. Engineers are investigating underlying Network Infrastructure issues in this region. Impacted services may include, but are not limited to App Services, Automation, Service Bus, Log Analytics, Key Vault, SQL Database, Service Fabric, Event Hubs, Stream Analytics, Azure Data Movement, API Management, and Azure Cognitive Search. Multiple engineering teams are engaged in multiple workflows to mitigate the impact. The next update will be provided in 60 minutes, or as events warrant.",
"stage": "Active",
"communicationId": "636361902146035247",
"version": "0.1.1"
}
}
This category contains the record of resource health events that have occurred to your Azure resources. An example of the type of event you would see in this category is "Virtual Machine health status changed to unavailable." Resource health events can represent one of four health statuses: Available, Unavailable, Degraded, and Unknown. Additionally, resource health events can be categorized as being Platform Initiated or User Initiated.
A resource health event is recorded in the activity log when:
An annotation, for example "ResourceDegraded" or "AccountClientThrottling", is submitted for a resource.
A resource transitioned to or from Unhealthy.
A resource was Unhealthy for more than 15 minutes.
The following resource health transitions aren't recorded in the activity log:
A transition to Unknown state.
A transition from Unknown state if:
This is the first transition.
If the state prior to Unknown is the same as the new state after. (For example, if the resource transitioned from Healthy to Unknown and back to Healthy).
For compute resources: VMs that transition from Healthy to Unhealthy, and back to Healthy, when the Unhealthy time is less than 35 seconds.
The type of resource affected by a Resource Health event.
resourceId
Name of the resource ID for the impacted resource.
status
String describing the status of the health event. Values can be: Active, Resolved, InProgress, Updated.
subStatus
Usually null for alerts.
submissionTimestamp
Timestamp when the event became available for querying.
subscriptionId
Azure Subscription ID.
properties
Set of <Key, Value> pairs (that is, a Dictionary) describing the details of the event.
properties.title
A user-friendly string that describes the health status of the resource.
properties.details
A user-friendly string that describes further details about the event.
properties.currentHealthStatus
The current health status of the resource. One of the following values: "Available", "Unavailable", "Degraded", and "Unknown".
properties.previousHealthStatus
The previous health status of the resource. One of the following values: "Available", "Unavailable", "Degraded", and "Unknown".
properties.type
A description of the type of resource health event.
properties.cause
A description of the cause of the resource health event. Either "UserInitiated" and "PlatformInitiated".
Alert category
This category contains the record of all activations of classic Azure alerts. An example of the type of event you would see in this category is "CPU % on myVM is over 80 for the past 5 minutes." Various Azure systems have an alerting concept: you can define a rule of some sort and receive a notification when conditions match that rule. Each time a supported Azure alert type 'activates,' or the conditions are met to generate a notification, a record of the activation is also pushed to this category of the Activity Log.
Name of the resource group for the impacted resource if it's a metric alert. For other alert types, it's the name of the resource group that contains the alert itself.
resourceProviderName
Name of the resource provider for the impacted resource if it's a metric alert. For other alert types, it's the name of the resource provider for the alert itself.
resourceId
Name of the resource ID for the impacted resource if it's a metric alert. For other alert types, it's the resource ID of the alert resource itself.
operationId
A GUID shared among the events that correspond to a single operation.
operationName
Name of the operation.
properties
Set of <Key, Value> pairs (that is, a Dictionary) describing the details of the event.
status
String describing the status of the operation. Some common values are: Started, In Progress, Succeeded, Failed, Active, Resolved.
subStatus
Usually null for alerts.
eventTimestamp
Timestamp when the event was generated by the Azure service processing the request corresponding the event.
submissionTimestamp
Timestamp when the event became available for querying.
subscriptionId
Azure Subscription ID.
Properties field per alert type
The properties field will contain different values depending on the source of the alert event. Two common alert event providers are Activity Log alerts and metric alerts.
Properties for Activity Log alerts
Element Name
Description
properties.subscriptionId
The subscription ID from the activity log event that caused this activity log alert rule to be activated.
properties.eventDataId
The event data ID from the activity log event that caused this activity log alert rule to be activated.
properties.resourceGroup
The resource group from the activity log event that caused this activity log alert rule to be activated.
properties.resourceId
The resource ID from the activity log event that caused this activity log alert rule to be activated.
properties.eventTimestamp
The event timestamp of the activity log event that caused this activity log alert rule to be activated.
properties.operationName
The operation name from the activity log event that caused this activity log alert rule to be activated.
properties.status
The status from the activity log event that caused this activity log alert rule to be activated.
Properties for metric alerts
Element Name
Description
properties.RuleUri
Resource ID of the metric alert rule itself.
properties.RuleName
The name of the metric alert rule.
properties.RuleDescription
The description of the metric alert rule (as defined in the alert rule).
properties.Threshold
The threshold value used in the evaluation of the metric alert rule.
properties.WindowSizeInMinutes
The window size used in the evaluation of the metric alert rule.
properties.Aggregation
The aggregation type defined in the metric alert rule.
properties.Operator
The conditional operator used in the evaluation of the metric alert rule.
properties.MetricName
The metric name of the metric used in the evaluation of the metric alert rule.
properties.MetricUnit
The metric unit for the metric used in the evaluation of the metric alert rule.
Autoscale category
This category contains the record of any events related to the operation of the autoscale engine based on any autoscale settings you have defined in your subscription. An example of the type of event you would see in this category is "Autoscale scale up action failed." Using autoscale, you can automatically scale out or scale in the number of instances in a supported resource type based on time of day and/or load (metric) data using an autoscale setting. When the conditions are met to scale up or down, the start and succeeded or failed events are recorded in this category.
Name of the resource group for the autoscale setting.
resourceProviderName
Name of the resource provider for the autoscale setting.
resourceId
Resource ID of the autoscale setting.
operationId
A GUID shared among the events that correspond to a single operation.
operationName
Name of the operation.
properties
Set of <Key, Value> pairs (that is, a Dictionary) describing the details of the event.
properties.Description
Detailed description of what the autoscale engine was doing.
properties.ResourceName
Resource ID of the impacted resource (the resource on which the scale action was being performed)
properties.OldInstancesCount
The number of instances before the autoscale action took effect.
properties.NewInstancesCount
The number of instances after the autoscale action took effect.
properties.LastScaleActionTime
The timestamp of when the autoscale action occurred.
status
String describing the status of the operation. Some common values are: Started, In Progress, Succeeded, Failed, Active, Resolved.
subStatus
Usually null for autoscale.
eventTimestamp
Timestamp when the event was generated by the Azure service processing the request corresponding the event.
submissionTimestamp
Timestamp when the event became available for querying.
subscriptionId
Azure Subscription ID.
Security category
This category contains the record any alerts generated by Microsoft Defender for Cloud. An example of the type of event you would see in this category is "Suspicious double extension file executed."
Sample event
JSON
{
"channels": "Operation",
"correlationId": "eeee4444-ff55-6666-77aa-888888bbbbbb",
"description": "Suspicious double extension file executed. Machine logs indicate an execution of a process with a suspicious double extension.\r\nThis extension may trick users into thinking files are safe to be opened and might indicate the presence of malware on the system.",
"eventDataId": "eeee4444-ff55-6666-77aa-888888bbbbbb",
"eventName": {
"value": "Suspicious double extension file executed",
"localizedValue": "Suspicious double extension file executed"
},
"category": {
"value": "Security",
"localizedValue": "Security"
},
"eventTimestamp": "2017-10-18T06:02:18.6179339Z",
"id": "/subscriptions/<subscription ID>/providers/Microsoft.Security/locations/centralus/alerts/bbbb1b1b-cc2c-dd3d-ee4e-ffffff5f5f5f/events/eeee4444-ff55-6666-77aa-888888bbbbbb/ticks/636439033386179339",
"level": "Informational",
"operationId": "eeee4444-ff55-6666-77aa-888888bbbbbb",
"operationName": {
"value": "Microsoft.Security/locations/alerts/activate/action",
"localizedValue": "Microsoft.Security/locations/alerts/activate/action"
},
"resourceGroupName": "myResourceGroup",
"resourceProviderName": {
"value": "Microsoft.Security",
"localizedValue": "Microsoft.Security"
},
"resourceType": {
"value": "Microsoft.Security/locations/alerts",
"localizedValue": "Microsoft.Security/locations/alerts"
},
"resourceId": "/subscriptions/<subscription ID>/providers/Microsoft.Security/locations/centralus/alerts/2518939942613820660_a48f8653-3fc6-4166-9f19-914f030a13d3",
"status": {
"value": "Active",
"localizedValue": "Active"
},
"subStatus": {
"value": null
},
"submissionTimestamp": "2017-10-18T06:02:52.2176969Z",
"subscriptionId": "<subscription ID>",
"properties": {
"accountLogonId": "0x2r4",
"commandLine": "c:\\mydirectory\\doubleetension.pdf.exe",
"domainName": "hpc",
"parentProcess": "unknown",
"parentProcess id": "0",
"processId": "6988",
"processName": "c:\\mydirectory\\doubleetension.pdf.exe",
"userName": "myUser",
"UserSID": "S-3-2-12",
"ActionTaken": "Detected",
"Severity": "High"
},
"relatedEvents": []
}
Name of the resource provider for Microsoft Defender for Cloud. Always "Microsoft.Security".
resourceType
The type of resource that generated the security event, such as "Microsoft.Security/locations/alerts"
resourceId
Resource ID of the security alert.
operationId
A GUID shared among the events that correspond to a single operation.
operationName
Name of the operation.
properties
Set of <Key, Value> pairs (that is, a Dictionary) describing the details of the event. These properties vary depending on the type of security alert. See this page for a description of the types of alerts that come from Defender for Cloud.
properties.Severity
The severity level. Possible values are "High," "Medium," or "Low."
status
String describing the status of the operation. Some common values are: Started, In Progress, Succeeded, Failed, Active, Resolved.
subStatus
Usually null for security events.
eventTimestamp
Timestamp when the event was generated by the Azure service processing the request corresponding the event.
submissionTimestamp
Timestamp when the event became available for querying.
subscriptionId
Azure Subscription ID.
Recommendation category
This category contains the record of any new recommendations that are generated for your services. An example of a recommendation would be "Use availability sets for improved fault tolerance." There are four types of Recommendation events that can be generated: High Availability, Performance, Security, and Cost Optimization.
Name of the operation. Always "Microsoft.Advisor/generateRecommendations/action"
resourceGroupName
Name of the resource group for the resource.
resourceProviderName
Name of the resource provider for the resource that this recommendation applies to, such as "MICROSOFT.COMPUTE"
resourceType
Name of the resource type for the resource that this recommendation applies to, such as "MICROSOFT.COMPUTE/virtualmachines"
resourceId
Resource ID of the resource that the recommendation applies to
status
Always "Active"
submissionTimestamp
Timestamp when the event became available for querying.
subscriptionId
Azure Subscription ID.
properties
Set of <Key, Value> pairs (that is, a Dictionary) describing the details of the recommendation.
properties.recommendationSchemaVersion
Schema version of the recommendation properties published in the Activity Log entry
properties.recommendationCategory
Category of the recommendation. Possible values are "High Availability", "Performance", "Security", and "Cost"
properties.recommendationImpact
Impact of the recommendation. Possible values are "High", "Medium", "Low"
properties.recommendationRisk
Risk of the recommendation. Possible values are "Error", "Warning", "None"
Policy category
This category contains records of all effect action operations performed by Azure Policy. Examples of the types of events you would see in this category include Audit and Deny. Every action taken by Policy is modeled as an operation on a resource.
Array of Azure RBAC properties of the event. For new resources, this is the action and scope of the request that triggered evaluation. For existing resources, the action is "Microsoft.Resources/checkPolicyCompliance/read".
caller
For new resources, the identity that initiated a deployment. For existing resources, the GUID of the Microsoft Azure Policy Insights RP.
channels
Policy events use only the "Operation" channel.
claims
The JWT token used by Active Directory to authenticate the user or application to perform this operation in Resource Manager.
correlationId
Usually a GUID in the string format. Events that share a correlationId belong to the same uber action.
description
This field is blank for Policy events.
eventDataId
Unique identifier of an event.
eventName
Either "BeginRequest" or "EndRequest". "BeginRequest" is used for delayed auditIfNotExists and deployIfNotExists evaluations and when a deployIfNotExists effect starts a template deployment. All other operations return "EndRequest".
category
Declares the activity log event as belonging to "Policy".
eventTimestamp
Timestamp when the event was generated by the Azure service processing the request corresponding the event.
ID
Unique identifier of the event on the specific resource.
level
Severity level of the event. Audit uses "Warning" and Deny uses "Error". An auditIfNotExists or deployIfNotExists error can generate "Warning" or "Error" depending on severity. All other Policy events use "Informational".
operationId
A GUID shared among the events that correspond to a single operation.
operationName
Name of the operation and directly correlates to the Policy effect.
resourceGroupName
Name of the resource group for the evaluated resource.
resourceProviderName
Name of the resource provider for the evaluated resource.
resourceType
For new resources, it's the type being evaluated. For existing resources, returns "Microsoft.Resources/checkPolicyCompliance".
resourceId
Resource ID of the evaluated resource.
status
String describing the status of the Policy evaluation result. Most Policy evaluations return "Succeeded", but a Deny effect returns "Failed". Errors in auditIfNotExists or deployIfNotExists also return "Failed".
subStatus
Field is blank for Policy events.
submissionTimestamp
Timestamp when the event became available for querying.
subscriptionId
Azure Subscription ID.
properties.isComplianceCheck
Returns "False" when a new resource is deployed or an existing resource's Resource Manager properties are updated. All other evaluation triggers result in "True".
properties.resourceLocation
The Azure region of the resource being evaluated.
properties.ancestors
A comma-separated list of parent management groups ordered from direct parent to farthest grandparent.
properties.policies
Includes details about the policy definition, assignment, effect, and parameters that this Policy evaluation is a result of.
relatedEvents
This field is blank for Policy events.
Schema from storage account and event hubs
When streaming the Azure Activity log to a storage account or event hub, the data follows the resource log schema. The table below provides a mapping of properties from the above schemas to the resource logs schema.
subscriptionId, resourceType, resourceGroupName are all inferred from the resourceId.
operationName
operationName.value
category
Part of operation name
Always "Administrative"
resultType
status.value
resultSignature
substatus.value
resultDescription
description
durationMs
N/A
Always 0
callerIpAddress
httpRequest.clientIpAddress
correlationId
correlationId
identity
claims and authorization properties
Level
Level
location
N/A
Location of where the event was processed. This isn't the location of the resource, but rather where the event was processed. This property will be removed in a future update.
Properties
properties.eventProperties
properties.eventCategory
category
If properties.eventCategory isn't present, category is "Administrative"
properties.eventName
eventName
properties.operationId
operationId
properties.eventProperties
properties
Following is an example of an event using this schema:
Συμμετάσχετε στη σειρά meetup για να δημιουργήσετε κλιμακούμενες λύσεις AI που βασίζονται σε πραγματικές περιπτώσεις χρήσης με συναδέλφους προγραμματιστές και ειδικούς.