Skip to content

Latest commit

 

History

History
133 lines (96 loc) · 5 KB

File metadata and controls

133 lines (96 loc) · 5 KB
title Update onPremisesSyncBehavior
description Update the properties of an onPremisesSyncBehavior object.
author rubytek-git
ms.reviewer Darshan.Maiya,rteklemariam
ms.date 06/30/2025
ms.localizationpriority medium
ms.subservice entra-directory-management
doc_type apiPageType

Update onPremisesSyncBehavior

Namespace: microsoft.graph

[!INCLUDE beta-disclaimer]

Update the properties of an onPremisesSyncBehavior object.

[!INCLUDE national-cloud-support]

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.

Supported resource Delegated (work or school account) Delegated (personal Microsoft account) Application
group Group-OnPremisesSyncBehavior.ReadWrite.All Not supported. Group-OnPremisesSyncBehavior.ReadWrite.All
orgContact Contacts-OnPremisesSyncBehavior.ReadWrite.All Not supported. Contacts-OnPremisesSyncBehavior.ReadWrite.All
user User-OnPremisesSyncBehavior.ReadWrite.All Not supported. User-OnPremisesSyncBehavior.ReadWrite.All

Important

In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with a supported role permission. Hybrid Administrator is the least privileged role supported for this operation.

HTTP request

PATCH /contacts/{id}/onPremisesSyncBehavior
PATCH /groups/{id}/onPremisesSyncBehavior
PATCH /users/{id}/onPremisesSyncBehavior

Request headers

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

Request body

[!INCLUDE table-intro]

Property Type Description
isCloudManaged Boolean Indicates whether the object’s source of authority is set to the cloud. If true, updates from on-premises Active Directory are blocked in the cloud; if false, updates from on-premises Active Directory are allowed in the cloud and object can be taken over by the on-premises Active Directory.

Response

If successful, this method returns a 204 No Content response code.

Examples

Request

The following example shows a request.

PATCH https://graph.microsoft.com/beta/groups/e7c2f02a-7a59-40de-8d6e-1e0197b8cfba/onPremisesSyncBehavior
Content-Type: application/json

{
  "@odata.type": "#microsoft.graph.onPremisesSyncBehavior",
  "isCloudManaged": true
}

[!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 204 No Content