alertRule resource type

Namespace: microsoft.graph.deviceManagement

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Represents a rule that an IT administrator with the appropriate roles can configure to monitor issues and trigger alerts on the Microsoft Endpoint Manager admin center.

When the threshold of an alertRule is reached, an alertRecord is generated and stored, and administrators receive notifications via defined notification channels.

For more information, see the monitoring resource.

Note

This API is part of the alert monitoring API set which currently supports only Windows 365 and Cloud PC scenarios. The API set allows admins to set up rules to alert issues with provisioning Cloud PCs, uploading Cloud PC images, and checking Azure network connections.

Have a different scenario that can use additional programmatic alert support on the Microsoft Endpoint Manager admin center? Suggest the feature or vote for existing feature requests.

Method Return type Description
List alertRules microsoft.graph.deviceManagement.alertRule collection Get a list of the alertRule objects and their properties.
Create alertRule microsoft.graph.deviceManagement.alertRule Create an alertRule object.
Get alertRule microsoft.graph.deviceManagement.alertRule Read the properties and relationships of an alertRule object.
Update alertRule microsoft.graph.deviceManagement.alertRule Update the properties of an alertRule object.

Properties

Property Type Description
alertRuleTemplate microsoft.graph.deviceManagement.alertRuleTemplate The rule template of the alert event. The possible values are: cloudPcProvisionScenario, cloudPcImageUploadScenario, cloudPcOnPremiseNetworkConnectionCheckScenario, cloudPcInGracePeriodScenario, cloudPcFrontlineInsufficientLicensesScenario, cloudPcInaccessibleScenario. You must use the Prefer: include-unknown-enum-members request header to get the following values from this evolvable enum: cloudPcInGracePeriodScenario.
description String The rule description.
displayName String The display name of the rule.
enabled Boolean The status of the rule that indicates whether the rule is enabled or disabled. If true, the rule is enabled; otherwise, the rule is disabled.
id String The unique identifier for the alert rule. Inherited from entity.
isSystemRule Boolean Indicates whether the rule is a system rule. If true, the rule is a system rule; otherwise, the rule is a custom-defined rule and can be edited. System rules are built in and only a few properties can be edited.
notificationChannels microsoft.graph.deviceManagement.notificationChannel collection The notification channels of the rule selected by the user.
severity microsoft.graph.deviceManagement.ruleSeverityType The severity of the rule. The possible values are: unknown, informational, warning, critical, unknownFutureValue.
threshold microsoft.graph.deviceManagement.ruleThreshold The conditions that determine when to send alerts. For example, you can configure a condition to send an alert when provisioning fails for six or more Cloud PCs. This property is deprecated. Use conditions instead.
conditions microsoft.graph.deviceManagement.ruleCondition collection The conditions that determine when to send alerts. For example, you can configure a condition to send an alert when provisioning fails for six or more Cloud PCs.

alertRuleTemplate values

Member Description
cloudPcProvisionScenario The alert rule was triggered for an issue with the Cloud PC provisioning. For a system rule, the alert rule was triggered for a Cloud PC provisioning failure.
cloudPcImageUploadScenario The alert rule was triggered for an issue with the process to upload the Cloud PC image. For a system rule, the alert rule was triggered for a failure to upload the Cloud PC image.
cloudPcOnPremiseNetworkConnectionCheckScenario The alert rule was triggered for an issue with the on-premises network connection check. For a system rule, the alert rule was triggered for a failure with the on-premises network connection.
unknownFutureValue Evolvable enumeration sentinel value. Don't use.
cloudPcInGracePeriodScenario The alert rule was triggered when the Cloud PC entered the grace period.
cloudPcFrontlineInsufficientLicensesScenario The alert rule was triggered for the Frontline Cloud PCs where more concurrent Cloud PC connections were active than the concurrency limit allows.
cloudPcInaccessibleScenario The alert rule was triggered when Cloud PCs couldn't connect due to host health failure, connection errors, or a zone outage. Alternatively, because they were under provisioning or restoring device status.
cloudPcFrontlineBufferUsageScenario The alert rule was triggered for the Frontline Cloud PCs buffer usage when the buffer is used over the time limit or the count limit. When the tenants use all of the frontline licenses, there's a predefined buffer time or number of licenses that allows Cloud PC users to continue to use them. This alert is triggered when tenants use all of the buffered time or licenses.

ruleSeverityType values

Member Description
unknown The severity level is unknown. Used for initialization.
informational The severity level is informational.
warning The severity level is warning.
critical The severity level is critical.
unknownFutureValue Evolvable enumeration sentinel value. Don't use.

Relationships

None.

JSON representation

The following JSON representation shows the resource type.

{
  "@odata.type": "#microsoft.graph.deviceManagement.alertRule",
  "alertRuleTemplate": "String",  
  "description": "String",
  "displayName": "String",
  "enabled": "Boolean",
  "id": "String (identifier)",
  "isSystemRule": "Boolean",
  "notificationChannels": [
    {
      "@odata.type": "microsoft.graph.deviceManagement.notificationChannel"
    }
  ], 
  "severity": "String",
  "threshold": {
    "@odata.type": "microsoft.graph.deviceManagement.ruleThreshold"
  },
  "conditions": [
    {
      "@odata.type": "microsoft.graph.deviceManagement.ruleCondition"
    }
  ]
}