| 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 |
Namespace: microsoft.graph
[!INCLUDE beta-disclaimer]
Update the properties of domain object. Only verified domains can be updated.
[!INCLUDE national-cloud-support]
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
The work or school account needs to belong to at least one of the following Microsoft Entra roles:
- Domain Name Administrator
- Security Administrator
- External Identity Provider Administrator
PATCH /domains/{id}For {id}, specify the domain with its fully qualified domain name.
| Name | Description |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
| Content-Type | application/json |
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.
If successful, this method returns a 204 No Content response code and no response body.
PATCH https://graph.microsoft.com/beta/domains/contoso.com
Content-type: application/json
{
"isDefault": true,
"supportedServices": [
"Email",
"OfficeCommunicationsOnline",
"CustomUrlDomain"
]
}[!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]
HTTP/1.1 204 No Content