Skip to main content
Post image
· 5 min read

Simplified Testing of Apporetum Event Subscriptions

Overview​

Azure Event Grid Viewer simplifies the testing and monitoring of Azure Event Grid subscriptions by offering a convenient interface to view and validate events. It empowers you to ensure the proper functioning of event-driven applications, identify potential issues, and gain insights into the event stream. By utilizing this tool, you can save time and effort in debugging and troubleshooting event grid implementations.

Azure Event Grid Viewer is a tool that simplifies the testing and monitoring of Azure Event Grid subscriptions. This tool provides a user-friendly interface for visualizing and validating the events being published to Event Grid. By leveraging Azure Event Grid Viewer, developers and integrators can easily debug, troubleshoot, and test their event-driven processes and systems.

The Azure Event Grid Viewer sample, available on the Microsoft documentation website, offers a comprehensive example of how to implement an event grid viewer. It demonstrates how to create a real-time event grid monitoring solution that displays events as they are received. With the sample, you can quickly set up a local or cloud-based instance of the event grid viewer, configure the necessary endpoints and authentication, and start monitoring an event grid subscription.

Event Grid Viewer will allow you to visualise the events in real-time as they are published, providing instant feedback on event generation and delivery. This helps in verifying that the events are being published correctly and that the subscribers are receiving them as expected. The viewer also enables easy troubleshooting by displaying event details, including the event payload, headers, and metadata. This allows you to inspect the content of the events and identify any issues or discrepancies in the data being sent

Useful Starting Info​

To test events are being published and to be able to view the published events we will use a Microsoft utility called Azure Event Grid Viewer.

info

An updated version with a React based UI can be found here.

Deploying Event Grid Viewer​

  1. Start by clicking here
tip

This will launch Azure Portal and ask you to authenticate. Make sure you have the correct permissions to be able to deploy the web application onto one of your subscriptions in your tenant.

  1. Fill in the details under Basics

basics

  1. Click Review and create tab to double check if the information you put is correct

review and create

  1. Click Create to trigger the deployment process

in progress

  1. Wait then Check if "Your deployment is complete"

complete

  1. Go to the deployed web App resource and copy the Default domain from the Overview tab
note

You will need this value to subscribe to the events in the next section.

  1. Open your browser and paste the url of the Default domain into your browser. You should see the Azure Event Grid Viewer
info

If you see this page blow in your browser it means that the web application has been deployed successfully.

deployment successful

Set Up Event Grid Viewer to Subscribe to the Apporetum Event Grid Domain​

  1. Open Azure portal
  2. Navigate to the Event Grid Domain resource that was set up in the previous steps in Deploying Event Grid Viewer

event grid domain

  1. Under Entitles menu tab, select Domain-Scope Event Subscriptions
note

This will display all service subscribed to the Event Grid.

domain scope event subscriptions

  1. At the top page, click + Event Subscription
  2. Enter details to subscribe to the Apporetum Events
  • Enter a descriptive name in the Name field to identify the service subscribing to the events

  • Uncheck the Scope to domain topic checkbox

  • Select Web Hook from the Endpoint Type menu in the Endpoint Details section

  • Click Select an endpoint and paste in the Default domain from the previous section. Enter the following to the Default domain url - "/api/updates" so the webhook endpoint looks like this: https://{Default domain}/api/updates

  • Click Create button to complete the setup of the subscription

info
  • If the configuration has been completed successfully an event will be shown in the EventGridViewer showing that the Event Grid subscription has been established. successful event frid subscription

  • Example of Azure Event Grid Viewer receiving Apporetum events

example

Additional Subscription Configuration​

Filtering Apporetum Event Types​

  1. Open Azure portal
  2. Navigate to the Event Grid Domain resource
  3. Select Domain-Scope Event Subscriptions to see the services subscribed to the Apporetum topic
  4. Click on the event subscription name to show the Subscription details

subscription details

  1. Select Filters

From this blade in the portal you will be able to add filters for specific event types, event subjects that are sent to the end point. With filters you can filter on specific event types or by subject.

  • Access Events: are published when someone adds or removes an account from an App role a. Apporetum.Access.Add b. Apporetum.Access.Remove events
  • Membership Events: are published when the entitlement is added, removed or updated. a. Apporetum.Membership.Create b. Apporetum.Membership.Update c. Apporetum.Membership.Delete

Filtering Apporetum Subjects​

  1. Open Azure portal
  2. Navigate to the Event Grid Domain resource
  3. Select Domain-Scope Event Subscriptions to see the services subscribed to the Apporetum topic
  4. Click on the event subscription name to show the Subscription details

subscription details

  1. Select Filters
  2. Select the Enable subject filtering. This will show the subject filtering options

subject filtering

  1. Enter the section of the Event subject you wish to filter on. The Apporetum event subject has the following structure: DataSource/{Data Source GUID}/App/{App GUID}/Role/{Role GUID}
info

For example, "subject": "DataSource/860403b6-4685-4ebe-9a96-baffffc3adce/App/f8ac4912-2c3e-4128-c347-08db191854c1/Role/3cc77341-a9ee-488b-ba39-08db1919d4bc",

Additional subscription options​

From the subscription blade you will also be able to add specific retry policies, dead-lettering and add specific headers to the events that are sent to the end point.

additional subscription options



Related Articles

Lead Software Engineer | Entra Specialist
Publishing Apporetum Access Management Events to Azure Event Grid
· 4 min read
Lead Software Engineer | Entra Specialist
Troubleshooting Azure Event Grid Events
· 3 min read

From Same Author

Lead Software Engineer | Entra Specialist
Integrate any Application leveraging External Integrations
· 3 min read
Lead Software Engineer | Entra Specialist
Troubleshooting Azure Event Grid Events
· 3 min read
Lead Software Engineer | Entra Specialist
Get Accurate Logon Dates for Entra ID (formerly Azure Active Directory) Guest Users
· 4 min read