Bewerken

Delen via


Update unifiedRoleManagementAlertConfiguration

Namespace: microsoft.graph

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.

Update the properties of an alert configuration. The alert configuration can be one of the following types that are derived from the unifiedRoleManagementAlertConfiguration object:

This API is available in the following national cloud deployments.

Global service US Government L4 US Government L5 (DOD) China operated by 21Vianet

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) RoleManagementAlert.ReadWrite.Directory Not available.
Delegated (personal Microsoft account) Not supported. Not supported.
Application RoleManagementAlert.ReadWrite.Directory Not available.

Important

In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with a supported role permission. Privileged Role Administrator is the least privileged role supported for this operation.

HTTP request

PATCH /identityGovernance/roleManagementAlerts/alertConfigurations/{unifiedRoleManagementAlertConfigurationId}

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Content-Type application/json. Required.

Request body

In the request body, supply only the values for properties to update. Existing properties that aren't included in the request body maintain their previous values or are recalculated based on changes to other property values.

The following table specifies the properties that can be updated.

You must include the @odata.type property in the body of the request. The value for this property must be the same as the derived alert configuration type that you are updating. For example, if you are updating the tooManyGlobalAdminsAssignedToTenantAlertConfiguration alert configuration, the value for the @odata.type property must be #microsoft.graph.tooManyGlobalAdminsAssignedToTenantAlertConfiguration.

Property Type Description
duration Boolean The number of days to look back on from current timestamp.

Can be updated for the redundantAssignmentAlertConfiguration and the staleSignInAlertConfiguration alert configuration type.
globalAdminCountThreshold Int32 The threshold for the number of accounts assigned the Global Administrator role in the tenant. Triggers an alert if the number of global administrators in the tenant reaches or crosses this threshold value.

Can be updated for the tooManyGlobalAdminsAssignedToTenantAlertConfiguration alert configuration type.
isEnabled Boolean True if the alert is enabled. Setting to false will disable scanning for the specific alert. Optional.

Can be updated for all alert configuration types.
percentageOfGlobalAdminsOutOfRolesThreshold Int32 Threshold of the percentage of global administrators out of all the role assignments in the tenant. Triggers an alert if the percentage in the tenant reaches or crosses this threshold value.

Can be updated for the tooManyGlobalAdminsAssignedToTenantAlertConfiguration alert configuration type.
sequentialActivationCounterThreshold Int32 The minimum number of activations within the timeIntervalBetweenActivations period to trigger an alert.

Can be updated for the sequentialactivationrenewalsalertconfiguration alert configuration type.
timeIntervalBetweenActivations Duration Time interval between activations to trigger an alert.

Can be updated for the sequentialactivationrenewalsalertconfiguration alert configuration type.

Response

If successful, this method returns a 204 No Content response code.

Examples

Request

The following example shows a request.

PATCH https://graph.microsoft.com/beta/identityGovernance/roleManagementAlerts/alertConfigurations/DirectoryRole_67b47f38-0f0b-4e62-a3be-859140c2061f_TooManyGlobalAdminsAssignedToTenantAlert
Content-Type: application/json

{
  "@odata.type":"#microsoft.graph.tooManyGlobalAdminsAssignedToTenantAlertConfiguration",
  "isEnabled": "true",
  "globalAdminCountThreshold": 7,
  "percentageOfGlobalAdminsOutOfRolesThreshold": 70
}

Response

The following example shows the response.

HTTP/1.1 204 No Content