Skip to content

Latest commit

 

History

History
132 lines (94 loc) · 5.79 KB

File metadata and controls

132 lines (94 loc) · 5.79 KB
title Update insights
description Update privacy settings to display or return the specified type of insights in an organization.
author larsb
ms.localizationpriority medium
ms.subservice insights
doc_type apiPageType
ms.date 07/31/2024
ms.custom sfi-ga-nochange

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.

[!INCLUDE national-cloud-support]

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

[!INCLUDE permissions-table]

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

[!INCLUDE table-intro]

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"
}

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


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"
}