Skip to content

Latest commit

 

History

History
129 lines (96 loc) · 4.3 KB

File metadata and controls

129 lines (96 loc) · 4.3 KB
title Update domain
description Update the properties of domain object.
author tafra00
ms.localizationpriority medium
ms.subservice entra-directory-management
doc_type apiPageType
ms.date 10/25/2024

Update domain

Namespace: microsoft.graph

Update the properties of domain object. Only verified domains can be updated.

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

[!INCLUDE permissions-table]

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. The following least privileged roles are supported for this operation.

  • Domain Name Administrator
  • Security Administrator
  • External Identity Provider Administrator

HTTP request

PATCH /domains/{id}

For {id}, specify the domain with its fully qualified domain name.

Request headers

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

Request body

In the request body, supply the values for relevant fields to be updated. Existing properties not included in the request body will maintain their previous values or be recalculated based on changes to other property values. For best performance, only include changed values.

Response

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

Example

Request
PATCH https://graph.microsoft.com/v1.0/domains/contoso.com
Content-type: application/json

{
  "isDefault": true,
  "supportedServices": [
    "Email",
    "OfficeCommunicationsOnline"
  ]
}

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