Update microsoftApplicationDataAccessSettings
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 settings in a microsoftApplicationDataAccessSettings object that specify access from Microsoft applications to Microsoft 365 user data in an organization.
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) | Organization.ReadWrite.All | Not available. |
Delegated (personal Microsoft account) | Not supported. | Not supported. |
Application | Not supported. | Not supported. |
HTTP request
PATCH /organization/{organizationId}/settings/microsoftApplicationDataAccess
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.
Property | Type | Description |
---|---|---|
isEnabledForAllMicrosoftApplications | Boolean | When set to true , all users in the organization can access in a Microsoft app any Microsoft 365 data that the user has been authorized to access. The Microsoft app can be a Microsoft 365 app (e.g., Excel, Outlook) or non-Microsoft 365 app (e.g., Edge). The default is true . It is possible to disable this access for a subset of users in a Microsoft Entra security group, by specifying the group in the disabledForGroup property. When set to false , users can access authorized Microsoft 365 data only in a Microsoft 365 app. |
disabledForGroup | String | The ID of a Microsoft Entra security group whose members are allowed to access Microsoft 365 data using only Microsoft 365 apps, but not other Microsoft apps such as Edge. This is only applicable if isEnabledForAllMicrosoftApplications is set to true . |
Response
If successful, this method returns a 200 OK
response code and an updated microsoftApplicationDataAccessSettings object in the response body.
Examples
Request
The following example request shows how an admin updates the disabledForGroup privacy setting in order to prohibit users in a particular Microsoft Entra group from accessing Microsoft 365 data using Microsoft applications that are not part of Microsoft 365.
PATCH https://graph.microsoft.com/beta/organization/{organizationId}/settings/microsoftApplicationDataAccess
Content-Type: application/json
{
"disabledForGroup": "edbfe4fb-ec70-4300-928f-dbb2ae86c981"
}
Response
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.microsoftApplicationDataAccessSettings",
"isEnabledForAllMicrosoftApplications": true,
"disabledForGroup": "edbfe4fb-ec70-4300-928f-dbb2ae86c981"
}