Update insightsSettings

Namespace: microsoft.graph

Update privacy settings to display or return the specified type of insights in an organization. Currently, itemInsights is the only supported type of settings.

To learn more about customizing insights privacy for your organization, see Customize item insights privacy in Microsoft Graph.

This API is available in the following national cloud deployments.

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

Permissions

The following tables show the least privileged permission or permissions required to call this API on each supported resource type. Follow best practices to request least privileged permissions. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

To update itemInsights settings for an organization

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

Note: Using delegated permissions for this operation to update item insights requires the signed-in user to have a Global Administrator role.

HTTP request

To update settings for item insights:

PATCH /admin/people/itemInsights

Request headers

Header Value
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.

Property Type Description
disabledForGroup String The ID of a Microsoft Entra group, of which the specified type of insights are disabled for its members. Default is empty. Optional.
isEnabledInOrganization Boolean true if the specified insight type is enabled for the organization; false if the specified insight type is disabled for all users without exceptions. The default value is true. Optional.

Note: This operation doesn't verify the disabledForGroup property value if you include it in the request body. If you set the disabledForGroup property to a String, this operation doesn't check the existence of the corresponding Microsoft Entra group. This means, if you set disabledForGroup to a Microsoft Entra group that doesn't exist or is deleted afterwards, this operation can't identify any group membership and disable item insights for any specific users. If isEnabledInOrganization is set to true, the operation enables the specified type of insights for all the users in the organization.

Response

If successful, this method returns a 200 OK response code and an insightsSettings object in the response body.

Examples

Request

The following example shows how an admin updates the disabledForGroup privacy setting to prevent the display of item insights of users in a particular Microsoft Entra group.

PATCH https://graph.microsoft.com/v1.0/admin/people/itemInsights
Content-Type: application/json

{
  "disabledForGroup": "edbfe4fb-ec70-4300-928f-dbb2ae86c981"
}

Response

The following example shows the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 200 OK
Content-type: application/json

{
  "disabledForGroup": "edbfe4fb-ec70-4300-928f-dbb2ae86c981"
}