You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/event-grid/auth0-how-to.md
+77-60Lines changed: 77 additions & 60 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,68 +9,85 @@ ms.date: 05/18/2020
9
9
ms.author: babanisa
10
10
---
11
11
12
-
Note the Azure Subscription and Resource Group you want the Partner Topic to be created in.
13
-
Log in to your Auth0 account dashboard. Navigate to Logs > Streams, click “Create Stream” and select the “Azure Event Grid” event stream.
14
-
Provide the Azure Subscription ID, Resource Group and other required information and click “Save”
15
-
View your pending Partner Topics in Azure and activate the topic to allow events to flow.
16
-
17
-
Integrate Azure Event Grid with Auth0
18
-
In this article
19
-
Azure’s Event Grid is a serverless event bus that acts as an intermediary allowing you to send data from Auth0 into the Azure ecosystem.
20
-
You can create an event-driven workflow using Event Grid to send your Auth0 tenant logs to the targets of your choice (e.g., Azure Functions, Event Hubs, Sentinel and Logic Apps).
21
-
See the Auth0 event type codes for a full list of the events that Auth0 supports
22
-
Send events from Auth0 to Azure Event Grid
23
-
To send Auth0 events to Azure, you will need:
24
-
Enable Event Grid resource provider
25
-
Set up an event source (in this case, this is Auth0).
26
-
Set up an event handler, the app or service where the event will be sent.
27
-
For more information about these concepts, see Concepts in Azure Event Grid
28
-
Enable Event Grid resource provider
12
+
# Integrate Azure Event Grid with Auth0
13
+
14
+
This article describes how to connect your Auth0 and Azure accounts by creating an Event Grid partner topic.
15
+
16
+
See the [Auth0 event type codes](https://auth0.com/docs/logs/references/log-event-type-codes) for a full list of the events that Auth0 supports
17
+
18
+
## Send events from Auth0 to Azure Event Grid
19
+
To send Auth0 events to Azure:
20
+
21
+
1. Enable Event Grid resource provider
22
+
1. Set up an Auth0 Partner Topic in the Auth0 Dashboard
23
+
1. Activate the Partner Topic in Azure
24
+
1. Subscribe to events from Auth0
25
+
26
+
For more information about these concepts, see Event Grid [concepts](concepts.md).
27
+
28
+
### Enable Event Grid resource provider
29
29
If you haven’t previously used Event Grid, you will need to register the Event Grid resource provider. If you’ve used Event Grid before, skip to the next section.
30
30
31
-
In your Azure portal:
32
-
Select Subscriptions on the left menu
33
-
Select the subscription you’re using for Event Grid
34
-
On the left menu, under Settings, select Resource providers
35
-
Find Microsoft.EventGrid
36
-
Select Register
37
-
Refresh to make sure the status changes to Registered
38
-
Set up an Auth0 event source
39
-
Part of the integration process is to set Auth0 up for use as an event source (this step happens on your Dashboard).
40
-
Log in to the Auth0 Dashboard.
41
-
Navigate to Logs > Streams.
42
-
Click + Create Stream.
43
-
Select Azure Event Grid and enter a unique name for your new stream.
44
-
Create the event source by providing your Azure Subscription ID, Azure Region and a Resource Group name.
45
-
Click Save.
46
-
Go to the Azure Portal to complete the final steps of the integration.
47
-
Set up an event handler
48
-
Go to your Azure subscription and spin up a service that is supported as an event handler (for a full list of all supported event handlers go to this article).
49
-
Activate your Auth0 Partner Topic in Azure
31
+
In the Azure portal:
32
+
1.Select Subscriptions on the left menu
33
+
1.Select the subscription you’re using for Event Grid
34
+
1.On the left menu, under Settings, select Resource providers
35
+
1.Find Microsoft.EventGrid
36
+
1.Select Register
37
+
1.Refresh to make sure the status changes to Registered
38
+
39
+
### Set up an Auth0 Partner Topic
40
+
Part of the integration process is to set Auth0 up for use as an event source (this step happens in your [Auth0 Dashboard](https://manage.auth0.com/)).
41
+
42
+
1. Log in to the [Auth0 Dashboard](https://manage.auth0.com/).
43
+
1. Navigate to Logs > Streams.
44
+
1. Click + Create Stream.
45
+
1. Select Azure Event Grid and enter a unique name for your new stream.
46
+
1. Create the event source by providing your Azure Subscription ID, Azure Region and a Resource Group name.
47
+
1. Click Save.
48
+
49
+
### Activate your Auth0 Partner Topic in Azure
50
50
Activating the Auth0 topic in Azure allows events to flow from Auth0 to Azure.
51
-
Log in to the Azure Portal.
52
-
Search `Partner Topics` at the top and click `Event Grid Partner Topics` under services.
53
-
Click on the topic that matches the stream you created in your Auth0 Dashboard.
54
-
Confirm the `Source` field matches your Auth0 account.
55
-
Click Activate.
56
-
57
-
Subscribe to your Auth0 Partner Topic
58
-
You subscribe to an event grid topic to tell Event Grid which events to send to which event handler.
59
-
On the Event Grid topic page, select + Event Subscription on the toolbar
60
-
On the Create Event Subscription page:
61
-
Enter a name for the event subscription.
62
-
Select your desired Azure service or WebHook for the Endpoint type.
63
-
Follow the instructions for the particular service.
64
-
Back on the Create Event Subscription page, select Create.
65
-
To send events to your topic, please follow the instructions on this article.
66
-
Testing
67
-
At this point, your Event Grid workflow should be complete.
68
-
Verify the integration
51
+
52
+
1. Log in to the Azure Portal.
53
+
1. Search `Partner Topics` at the top and click `Event Grid Partner Topics` under services.
54
+
1. Click on the topic that matches the stream you created in your Auth0 Dashboard.
55
+
1. Confirm the `Source` field matches your Auth0 account.
56
+
1. Click Activate.
57
+
58
+
### Subscribe to Auth0 events
59
+
60
+
#### Create an event handler
61
+
To test your Partner Topic, you will need an event handler. Go to your Azure subscription and spin up a service that is supported as an [event handler](event-handlers.md) such as an [Azure Function](custom-event-to-function.md).
62
+
63
+
#### Subscribe to your Auth0 Partner Topic
64
+
Subscribing to your Auth0 Partner Topic allows you to tell Event Grid where you want your Auth0 events to go.
65
+
66
+
1. On the Partner Topic blade for your Auth0 integration, select + Event Subscription at the top.
67
+
1. On the Create Event Subscription page:
68
+
1. Enter a name for the event subscription.
69
+
1. Select your desired Azure service or WebHook for the Endpoint type.
70
+
1. Follow the instructions for the particular service.
71
+
1. Click Create.
72
+
73
+
## Testing
74
+
Your Auth0 Partner Topic integration with Azure should be ready to use.
75
+
76
+
### Verify the integration
69
77
To verify that the integration is working as expected:
70
-
Log in to the Auth0 Dashboard.
71
-
Navigate to Logs > Streams.
72
-
Click on your Event Grid stream.
73
-
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.
74
-
Delivery attempts and retries
75
-
Auth0 events are delivered to AWS via a streaming mechanism that sends each event as it is triggered in our system. If EventBridge is unable to receive the event, we will retry up to three times to deliver the event; otherwise, we will log the failure to deliver in our system.
76
78
79
+
1. Log in to the Auth0 Dashboard.
80
+
1. Navigate to Logs > Streams.
81
+
1. Click on your Event Grid stream.
82
+
1. 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.
83
+
84
+
Try [invoking any of the Auth0 actions that trigger an event to be published](https://auth0.com/docs/logs/references/log-event-type-codes) in order to see events flow.
85
+
86
+
## Delivery attempts and retries
87
+
Auth0 events are delivered to Azure via a streaming mechanism that sends each event as it is 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.
Auth0, the identity platform for application builders, provides developers and enterprises with the building blocks they need to secure their applications.
15
15
16
16
The Auth0 Partner Topic allows you customers to leverage events emitted by Auth0’s system to accomplish a number of tasks, from engaging with users in meaningful and custom ways after the authentication to automating security and infrastructure tasks.
0 commit comments