---
title: "Update a namespace."
method: PATCH
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}"
tags: ["Namespaces"]
---

# Update a namespace.

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

Asynchronously updates a namespace with the specified parameters.

## 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

## Request body

- NamespaceUpdateParameters — Properties to update namespace.
  - `tags` object — Tags of the namespace resource.
  - `identity` IdentityInfo — The identity information for the resource.
    - `type` 'None' | 'SystemAssigned' | 'UserAssigned' | 'SystemAssigned, UserAssigned' — The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user-assigned identities. The type 'None' will remove any identity.
    - `principalId` string — The principal ID of resource identity.
    - `tenantId` string — The tenant ID of resource.
    - `userAssignedIdentities` object — The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. This property is currently not used and reserved for future usage.
  - `sku` NamespaceSku — Represents available Sku pricing tiers.
    - `name` 'Standard' — The name of the SKU.
    - `capacity` integer — Specifies the number of Throughput Units that defines the capacity for the namespace. The property default value is 1 which signifies 1 Throughput Unit = 1MB/s ingress and 2MB/s egress per namespace. Min capacity is 1 and max allowed capacity is 20.
  - `properties` NamespaceUpdateParameterProperties — Information of namespace update parameter properties.
    - `topicSpacesConfiguration` UpdateTopicSpacesConfigurationInfo — Properties of the topic spaces configuration info of a namespace.
      - `state` 'Disabled' | 'Enabled' — Indicate if Topic Spaces Configuration is enabled for the namespace. Default is Disabled.
      - `routeTopicResourceId` string — This property is used to specify custom topic to which events will be routed to from topic spaces configuration under namespace.
      - `routingEnrichments` RoutingEnrichments — RoutingEnrichments definition.
        - `static` StaticRoutingEnrichment[]
          - `key` string — Static routing enrichment key.
          - `valueType` 'String', required — Static routing enrichment value type. For e.g. this property value can be 'String'.
        - `dynamic` DynamicRoutingEnrichment[]
          - `key` string — Dynamic routing enrichment key.
          - `value` string — Dynamic routing enrichment value.
      - `clientAuthentication` ClientAuthenticationSettings — Client authentication settings for namespace resource.
        - `alternativeAuthenticationNameSources` string[] — Alternative authentication name sources related to client authentication settings for namespace resource.
        - `customJwtAuthentication` CustomJwtAuthenticationSettings — Custom JWT authentication settings for namespace resource.
          - `tokenIssuer` string — Expected JWT token issuer.
          - `issuerCertificates` IssuerCertificateInfo[] — Information about the certificates that are used for token validation. We currently support maximum 2 certificates.
            - `certificateUrl` string, required — Keyvault certificate URL in https://keyvaultname.vault.azure.net/certificates/certificateName/certificateVersion format.
            - `identity` CustomJwtAuthenticationManagedIdentity — The identity information for retrieving the certificate for custom JWT authentication.
              - …
          - `encodedIssuerCertificates` EncodedIssuerCertificateInfo[] — Information about the encoded public certificates that are used for custom authentication.
            - `kid` string, required — Identifier for the certificate.
            - `encodedCertificate` string, required — Certificate in pem format.
        - `webhookAuthentication` WebhookAuthenticationSettings — Authentication settings for a webhook endpoint within a Namespace resource.
          - `identity` CustomWebhookAuthenticationManagedIdentity, required — The identity configuration required for authenticating a custom webhook.
            - `type` 'SystemAssigned' | 'UserAssigned', required — The type of managed identity used. Can be either 'SystemAssigned' or 'UserAssigned'.
            - `userAssignedIdentity` string, arm-id — The user identity associated with the resource.
          - `endpointUrl` string, uri, required — The URL endpoint where the Event Grid service sends authenticated webhook requests using the specified managed identity.
          - `endpointBaseUrl` string, uri — The base URL endpoint where the Event Grid service sends authenticated webhook requests using the specified managed identity.
          - `azureActiveDirectoryApplicationIdOrUri` string, required — Microsoft Entra ID Application ID or URI to get the access token that will be included as the bearer token in delivery requests.
          - `azureActiveDirectoryTenantId` string, required — Microsoft Entra ID Tenant ID to get the access token that will be included as the bearer token in delivery requests.
      - `maximumSessionExpiryInHours` integer — The maximum session expiry in hours. The property default value is 1 hour. Min allowed value is 1 hour and max allowed value is 8 hours.
      - `maximumClientSessionsPerAuthenticationName` integer — The maximum number of sessions per authentication name. The property default value is 1. Min allowed value is 1 and max allowed value is 100.
      - `routingIdentityInfo` RoutingIdentityInfo — Routing identity info for topic spaces configuration.
        - `type` 'None' | 'SystemAssigned' | 'UserAssigned' — Routing identity type for topic spaces configuration.
        - `userAssignedIdentity` string
      - `customDomains` CustomDomainConfiguration[] — Custom domain info for 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.
    - `topicsConfiguration` UpdateTopicsConfigurationInfo — Properties of the topics configuration info of a namespace.
      - `customDomains` CustomDomainConfiguration[] — Custom domain info for 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.
    - `publicNetworkAccess` 'Enabled' | 'Disabled' | 'SecuredByPerimeter' — This determines if traffic is allowed over public network. By default it is enabled. You can further restrict to specific IPs by configuring <seealso cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PubSub.NamespaceUpdateParameterProperties.InboundIpRules" />
    - `inboundIpRules` InboundIpRule[] — This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.
      - `ipMask` string — IP Address in CIDR notation e.g., 10.0.0.0/8.
      - `action` 'Allow' — Action to perform based on the match or no match of the IpMask.
    - `autoScaleConfiguration` UpdateAutoScaleConfiguration — UpdateAutoScaleConfiguration definition.
      - `enableAutoScale` boolean — Indicates whether auto-scaling is enabled for the namespace. When enabled, the namespace will automatically scale between minimumThroughputUnits and maximumThroughputUnits based on usage patterns.
      - `minimumThroughputUnits` integer — Minimum number of Throughput Units for auto-scaling. Valid only when EnableAutoScale is true.
      - `maximumThroughputUnits` integer — Maximum number of Throughput Units for auto-scaling. Valid only when EnableAutoScale is true.

## Response `200`

OK

- Namespace — Definition of a Resource.
  - `id` string — Fully qualified identifier of the resource.
  - `name` string — Name of the resource.
  - `type` string — Type of the resource.

## Other responses

- `202` — Namespace update request accepted.
- `default` — Error response returned if request was unsuccessful.

## Changes

- **2026-07-13** (2017-06-15-preview) `285f714f3339` — 2 warning
  - the optional response header `Azure-AsyncOperation` removed for the status `202`
  - 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) `cbb7abd10a95` — 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/patch.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)
