When working with an Azure Event Grid custom topic, we can either use a shared access signature or key authentication to publish the event to the Azure Event Grid custom topic. This option gives us the flexibility to choose the right option for new or existing applications. If we already have an application running and we are required to take advantage of the capabilities of Azure Event Grid, then the quickest way to integrate the application is via key authentication. When we have an enterprise-level application where security is vital, it is always recommended to work with a shared access signature for publishing events.
Publishing events through custom topics
Key authentication with code
Azure Event Grid key authentication...