What DomainName to provide to Get-AzEventGridSubscription for custom topics not in a domain?

MCCZ 0 Reputation points
2024-12-29T17:50:44.0366667+00:00

Hi,

the Get-AzEventGridSubscription's DomainName parameter is newly required since Az PowerShell 13 when querying by providing ResourceGroupName and TopicName (source, supported by a sample earlier on the page and an error message if not provided).

However, the custom topics do not seem to be part of a domain, nor is any domain configured.

  • Domains screen in the Azure portal lists no domain.
  • az eventgrid domain list returns an empy list.
  • The /domains/xxx part is not present in the topic subscription's resource id (it has a format of /subscriptions/xx/resourceGroups/xx/providers/Microsoft.EventGrid/topics/xx/providers/Microsoft.EventGrid/eventSubscriptions/xx).
  • Neither the Topic nor Subscription screens in the Azure Portal mentions any Domain.
  • Neither the Topic nor Subscription JSON mentions any Domain.

What value to provide as DomainName to satisfy the v13 cmdlet parameter requirements for custom topics not in a domain?

Azure Event Grid
Azure Event Grid
An Azure event routing service designed for high availability, consistent performance, and dynamic scale.
409 questions
{count} votes

1 answer

Sort by: Most helpful
  1. VenkateshDodda-MSFT 23,231 Reputation points Microsoft Employee
    2024-12-30T04:57:41.2433333+00:00

    @MCCZ Thanks for posting your question in Microsoft Q&A, apologize for any inconvenience caused on this.

    Based on the shared information, I understand that you are facing issue while trying to query the event grid subscription of custom topic using PowerShell.

    • If you Event Subscription is not part domain then use the parameter -scope to get the event grid subscription details of a custom topic.
    Get-AzEventGridSubscription -Name <SubscriptionName> -Scope "<EventGridTopicResourceId>"
    

    enter image description here

    • Portal allows you to create an Event subscription for a custom topic which is part of custom domain in Event Grid.

    If you want to get that event subscription properties, then you need to pass -DomainName parameter as it is required parameter as shown below.

    User's image

    Hope this helps, let me know if you have any further questions on this.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.