Skip to content

Latest commit

 

History

History
320 lines (231 loc) · 12.9 KB

insightssettings-update.md

File metadata and controls

320 lines (231 loc) · 12.9 KB
title description author ms.localizationpriority ms.subservice doc_type
Update insights
Update privacy settings to display or return the specified type of insights in an organization.
simonhult
medium
insights
apiPageType

Update insightsSettings

Namespace: microsoft.graph

[!INCLUDE beta-disclaimer]

Update privacy settings to display or return the specified type of insights in an organization. The type of settings can be contact insights, item insights, or people insights.

To learn more about customizing insights privacy for your organization, see:

[!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 contact insights settings for an organization

[!INCLUDE permissions-table]

To update item insights settings for an organization

[!INCLUDE permissions-table]

To update people insights settings for an organization

[!INCLUDE permissions-table]

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

HTTP request

To update settings for contact insights:

PATCH /organization/{organizationId}/settings/contactInsights

To update settings for item insights:

PATCH /admin/people/itemInsights

To update settings for people insights:

PATCH /organization/{organizationId}/settings/peopleInsights

Request headers

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

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. Default is true. Optional.

Note: This operation does not verify the disabledForGroup property value if you include it in the request body. If you set the disabledForGroup property to a String, this operation does not check the existence of the corresponding Microsoft Entra group. This means, if you set disabledForGroup to a Microsoft Entra group that does not exist or is deleted afterwards, this operation will not be able to identify any group membership and disable item or people insights for any specific users. If isEnabledInOrganization is set to true, the operation will enable 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

Example 1: Update settings for contact insights

Request

The following example shows how an admin updates the isEnabledInOrganization property to enable contact insights for the specified organization; the default value for isEnabledInOrganization is false, disabling contact insights. The example also sets the disabledForGroup privacy setting to prohibit displaying user's contact insights in a particular Microsoft Entra group.

PATCH https://graph.microsoft.com/beta/organization/{organizationId}/settings/contactInsights
Content-type: application/json

{
  "isEnabledInOrganization": true,
  "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]

[!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

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

Example 2: Update settings for item insights

Request

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

PATCH https://graph.microsoft.com/beta/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]

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

Example 3: Update settings for people insights

Request

The following example shows how an admin updates the disabledForGroup privacy setting in order to prohibit displaying people insights of users in a particular Microsoft Entra group.

PATCH https://graph.microsoft.com/beta/organization/{organizationId}/settings/peopleInsights
Content-type: application/json

{
  "isEnabledInOrganization": true,
  "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]

[!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

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