Introduction
This article shows how to change settings for insights for Microsoft 365 in associations utilizing Microsoft Graph Rest APIs.
In my past article, I covered essential inquiries for Insight settings customization. Underneath questions has been incorporated.
- What does the meaning of Insights Protection Settings?
- What does one need to keep in mind while changing the settings of Insights?
- How this progression will be affected to the behavior of UI in Microsoft 365?
How to configure item insights Using Microsoft Graph REST API?
As expressed before, naturally, Insights security settings are empowered at the organizational level.
You can change the default in one of two different ways:
- User can impede/disable item Insights for all users in affiliation using isEnabledInOrganization property in itemInsightSetting resource
- User can impede/disable item Insights for a group of users/subset of users, which is assigned in Azure AD Group
- Using disabled for group property in itemInsightSetting resource
Important
- At the time of writing this article, API is under beta form in Microsoft Graph which is liable to change.
- Utilizing these APIs for production development can put you in truble.Utilize the version selector to check API is accessible in v1.0 or not.
- To update ItemInsightPermission, the Application permission type is not supported yet. Only delegated permission is supported.
- To use delegated permission requires the signed-in user to have a global administrator Role.
How to disable Item Insights for the organization?
Rest Call To check current settings for Insights in Organization,
- Get https:
-
- Accept: application/json
- Content-type: application/json
Reponse will be as below.
- {
- "@odata.context": "https://graph.microsoft.com/beta/$metadata#organization('ae231454-fa2c-449e-85ed-b2c82b30f2d0')/settings/itemInsights/$entity",
- "isEnabledInOrganization": true,
- "disabledForGroup": null
- }
Rest Call to Update for Insight Settings
- PATCH https:
-
- Accept: application/json
- Content-type: application/json
-
- {
- "isEnabledInOrganization":false
- }
The response will be as below after update settings.
- {
- "@odata.context": "https://graph.microsoft.com/beta/$metadata#organization('ae231454-fa2c-449e-85ed-b2c82b30f2d0')/settings/itemInsights/$entity",
- "isEnabledInOrganization": false,
- "disabledForGroup": null
- }
Note
- Organization ID will be your tenant ID. You will get tenant ID from overview of Azure Active Directory in Azure Portal.
- As mentioned in previous article, Updating settinsg can take up to 8 hours to be applied across all Microsoft 365 experience.
How to disable Item Insights for Subsets of User/ for Specific Azure AD Group?
Rest Call to update Insights for a subset of users.
- PATCH https:
-
- Accept: application/json
- Content-type: application/json
-
- {
- "disabledForGroup": "7268b3ea-558f-4c61-be33-2ba1dcca4fce"
- }
The response will be as below after update settings for a specific group
- {
- "@odata.context": "https://graph.microsoft.com/beta/$metadata#organization('ae231454-fa2c-449e-85ed-b2c82b30f2d0')/settings/itemInsights/$entity",
- "isEnabledInOrganization": true,
- "disabledForGroup": "7268b3ea-558f-4c61-be33-2ba1dcca4fce"
- }
Reference Links
HappyCoding