I have one Azure Event Grid Topic named demoevent
with below Access keys:
To get these Azure Event Grid Topic secrets dynamically using Azure CLI, you can make use of below command:
az eventgrid topic key list --resource-group <resourceGroupName> --name <topicName>
Response:
To get the value of specific key, you can use below CLI command by adding --query
in it at the end:
az eventgrid topic key list --output tsv --resource-group <resourceGroupName> --name <topicName> --query "key1"
Response: