---
title: "Validate ownership for all custom domains in a namespace."
method: POST
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/validateCustomDomainOwnership"
tags: ["Namespaces"]
---

# Validate ownership for all custom domains in a namespace.

`POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/validateCustomDomainOwnership`

Performs ownership validation via checking TXT records for all custom domains in a namespace.

## Path parameters

- `namespaceName` string, required

## Parameters

- `../../../../../../common-types/resource-management/v3/types.json#/components/parameters/SubscriptionIdParameter` — unresolved $ref
- `../../../../../../common-types/resource-management/v6/types.json#/components/parameters/ResourceGroupNameParameter` — unresolved $ref
- `../../../../../../common-types/resource-management/v6/types.json#/components/parameters/ApiVersionParameter` — unresolved $ref

## Response `200`

OK

- CustomDomainOwnershipValidationResult — Namespace custom domain ownership validation result.
  - `customDomainsForTopicsConfiguration` CustomDomainConfiguration[] — List of custom domain configurations for the namespace under topics configuration.
    - `fullyQualifiedDomainName` string, required — Fully Qualified Domain Name (FQDN) for the custom domain.
    - `validationState` 'Pending' | 'Approved' | 'ErrorRetrievingDnsRecord' — Validation state for the custom domain. This is a read only property and is initially set to 'Pending' and will be updated to 'Approved' by Event Grid only after ownership of the domain name has been successfully validated.
    - `identity` CustomDomainIdentity — The identity information for retrieving the certificate for the custom domain.
      - `type` 'SystemAssigned' | 'UserAssigned' — The type of managed identity used. Can be either 'SystemAssigned' or 'UserAssigned'.
      - `userAssignedIdentity` string — The user identity associated with the resource.
    - `certificateUrl` string — The URL for the certificate that is used for publishing to the custom domain. We currently support certificates stored in Azure Key Vault only. While certificate URL can be either versioned URL of the following format https://{key-vault-name}.vault.azure.net/certificates/{certificate-name}/{version-id}, or unversioned URL of the following format (e.g., https://contosovault.vault.azure.net/certificates/contosocert, we support unversioned certificate URL only (e.g., https://contosovault.vault.azure.net/certificates/contosocert)
    - `expectedTxtRecordName` string — Expected DNS TXT record name. Event Grid will check for a TXT record with this name in the DNS record set of the custom domain name to prove ownership over the domain. The values under this TXT record must contain the expected TXT record value.
    - `expectedTxtRecordValue` string — Expected DNS TXT record value. Event Grid will check for a TXT record with this value in the DNS record set of the custom domain name to prove ownership over the domain.
  - `customDomainsForTopicSpacesConfiguration` CustomDomainConfiguration[] — List of custom domain configurations for the namespace under topic spaces configuration.
    - `fullyQualifiedDomainName` string, required — Fully Qualified Domain Name (FQDN) for the custom domain.
    - `validationState` 'Pending' | 'Approved' | 'ErrorRetrievingDnsRecord' — Validation state for the custom domain. This is a read only property and is initially set to 'Pending' and will be updated to 'Approved' by Event Grid only after ownership of the domain name has been successfully validated.
    - `identity` CustomDomainIdentity — The identity information for retrieving the certificate for the custom domain.
      - `type` 'SystemAssigned' | 'UserAssigned' — The type of managed identity used. Can be either 'SystemAssigned' or 'UserAssigned'.
      - `userAssignedIdentity` string — The user identity associated with the resource.
    - `certificateUrl` string — The URL for the certificate that is used for publishing to the custom domain. We currently support certificates stored in Azure Key Vault only. While certificate URL can be either versioned URL of the following format https://{key-vault-name}.vault.azure.net/certificates/{certificate-name}/{version-id}, or unversioned URL of the following format (e.g., https://contosovault.vault.azure.net/certificates/contosocert, we support unversioned certificate URL only (e.g., https://contosovault.vault.azure.net/certificates/contosocert)
    - `expectedTxtRecordName` string — Expected DNS TXT record name. Event Grid will check for a TXT record with this name in the DNS record set of the custom domain name to prove ownership over the domain. The values under this TXT record must contain the expected TXT record value.
    - `expectedTxtRecordValue` string — Expected DNS TXT record value. Event Grid will check for a TXT record with this value in the DNS record set of the custom domain name to prove ownership over the domain.

## Other responses

- `202` — Accepted
- `default` — Error response returned if request was unsuccessful.

## Changes

- **2026-07-13** (2017-06-15-preview) `285f714f3339` — 1 warning
  - the optional response header `Retry-After` removed for the status `202`
- **2026-07-13** (2017-06-15-preview) `6114a105ef69` — 3 warning
  - deleted the `path` request parameter `resourceGroupName`
  - deleted the `path` request parameter `subscriptionId`
  - deleted the `query` request parameter `api-version`
- **2026-07-13** (2017-06-15-preview) `88277b1edf4d` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/azure/apis/eventgrid-microsoft-eventgrid-eventgrid/changes/subscriptions/:subscriptionId/resourceGroups/:resourceGroupName/providers/Microsoft.EventGrid/namespaces/:namespaceName/validateCustomDomainOwnership/post.md)

---

[API](https://skmtc.dev/azure/apis/eventgrid-microsoft-eventgrid-eventgrid.md) · [All operations](https://skmtc.dev/azure/apis/eventgrid-microsoft-eventgrid-eventgrid/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/eventgrid-microsoft-eventgrid-eventgrid/revisions/285f714f3339/schema)
