Official Content

The EventGridRouterProvider external object below the AzureEventGrid module is used to establish a connection to an Azure Event Grid using the Event Messaging API.



It doesn't have any.



A static method that allows instantiating an EventRouter. The method returns an EventRouter to publish events to Azure Event Grid.

Return value: EventRouter external object
Parameters: endpoint:VarChar, accesskey:VarChar, errorMessages:GeneXus.Common.Messages, success:Boolean.

  • endpoint indicates the Azure Event Grid Topic or domain endpoint.


  • accesskey is optional. It is found on the left pane of the Event Grid Topic definition.
    If left empty, the system tries to authenticate using Azure Active Directory. That is, if the application is deployed to an Azure host with Managed Identity enabled or a security principal defined, the application will authenticate with that account. For more information, see Azure Active Directory authentication in this document.


This external object is available since GeneXus 18 Upgrade 5.

Azure Active Directory authentication

Applications can use managed identities to obtain Azure AD (Microsoft Entra ID) tokens without having to manage any credentials.
As Azure documents explain, it is recommended that apps use token-based authentication rather than connection strings when authenticating to Azure resources.

The implementation of the connect method (if no access key is passed) chains several Token Credential implementations to be tried in order until one succeds:

  • System-assigned Managed Identity
    Attempts authentication using a managed identity that has been assigned to the deployment environment. This authentication type works for all Azure hosted environments that support managed identity.
  • User-assigned Managed Identity.
    The resource id to authenticate for a user assigned managed identity must be set in an environment variable named "AZURE_CLIENT_ID".
  • Service Principal. Enables authentication to Azure Active Directory (Microsoft Entra ID) using a client secret or certificate, or as a user with a username and password. See here for more details.
  • Azure CLI credentials
    Enables authentication to Azure Active Directory using Azure CLI to obtain an access token (for development environments).

For configuration details see Authentication and authorization with Azure Active Directory.

See Also

Custom Topics in Azure Event Grid.

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant