title | description | ms.topic | ms.date |
---|---|---|---|
How to send events from Auth0 to Azure using Azure Event Grid |
How to end events from Auth0 to Azure services with Azure Event Grid. |
conceptual |
03/29/2022 |
This article describes how to connect your Auth0 and Azure accounts by creating an Event Grid partner topic.
Note
See the Auth0 event type codes for a full list of the events that Auth0 supports
To send Auth0 events to Azure:
- Register the Event Grid resource provider with your Azure subscription.
- Authorize Auth0 to create a partner topic in your resource group.
- Request Auth0 to enable events flow to a partner topic by setting up an Auth0 partner topic in the Auth0 Dashboard.
- Activate partner topic so that your events start flowing to your partner topic.
- Subscribe to events.
This article provides steps for doing the task #3 from the above list. All other tasks are documented in the Subscribe to partner events article.
Part of the integration process is to set up Auth0 for use as an event source by using the Auth0 Dashboard.
- Log in to the Auth0 Dashboard.
- Navigate to Monitoring > Streams.
- Click + Create Log Stream.
- Select Azure Event Grid and enter a unique name for your new stream.
- For Subscription ID, enter your Azure subscription ID.
- For Azure Region, select the Azure region in which the resource group exists.
- For Resource Group, enter the name of the resource group.
- For Filter by Event Category, select All or filter for specific types of events.
- Select Use a specific day and time to start the stream from option if you want the streaming to start on a specific day and time.
- Click Save.
You should see the partner topic in the resource group you specified. Activate the partner topic so that your events start flowing to your partner topic. Then, subscribe to events.
To verify that the integration is working as expected:
- Log in to the Auth0 Dashboard.
- Navigate to Logs > Streams.
- Click on your Event Grid stream.
- Once on the stream, click on the Health tab. The stream should be active and as long as you don't see any errors, the stream is working.
Try invoking any of the Auth0 actions that trigger an event to be published to see events flow.
Auth0 events are delivered to Azure via a streaming mechanism. Each event is sent as it's triggered in Auth0. If Event Grid is unable to receive the event, Auth0 will retry up to three times to deliver the event. Otherwise, Auth0 will log the failure to deliver in its system.