Event Types
You can create event streams that listen for different types of events, such as the creation of a new user profile. The sections below outline specific details for currently supported event types.
Event object
Events are published using a schema that conforms to the CloudEvent specification:
Parameter | Type | Required | Description |
---|---|---|---|
id | string | Yes | Identifies the event. |
source | URI-reference | Yes | Identifies the tenant that generated the event, including its environment. |
specversion | string | Yes | The version of the CloudEvents specification that the event uses. |
type | string | Yes | The type of event. |
time | timestamp | Yes | Timestamp of when the event happened. |
dataschema | URI | Yes | Identifies the schema that data adheres to. |
data | object | Yes | Additional information related to the event. This field varies based on the type of event. |
{
"id": "evt_<unique-id>",
"source": "urn:auth0:<your-tenant>:users",
"spec_version": "1.0",
"type": "com.auth0.user.<event-type>",
"time": "2025-01-29T14:36:25.794Z",
"dataschema": "https://<your-tenant>.auth0.com/api/v2/schemas/user.<event-type>",
"data": {
"object": {
"user_id": "<user-id>",
"email": "<email>",
"email_verified": <true/false>,
"family_name": "<family-name>",
"given_name": "<given-name>",
"name": "<full-name>",
"nickname": "<nickname>",
"phone_number": "<phone-number>",
"phone_verified": <true/false>,
"user_metadata": {
"hobby": "<user-hobby>"
},
"app_metadata": {
"external_user_id": "<external-id>"
},
"identities": [
{
"connection": "<connection-name>",
"user_id": "<identity-user-id>",
"provider": "<identity-provider>",
"isSocial": <true/false>
}
],
"created_at": "<user-created-time>",
"updated_at": "<user-updated-time>",
"picture": "<profile-picture-url>"
}
}
}
Was this helpful?
User event types
When creating an event stream, you can subscribe to the following user events:
Event | Description |
---|---|
user.created |
Published each time a user is created. This event captures users created through a variety of channels, such as a signup page, the Auth0 Management API, custom signup forms, bulk user imports, SCIM, or JIT (for Social, Enterprise, or Passwordless connections). |
user.updated |
Published each time a user is updated. This event captures user updates made through a variety of channels, such as the Auth0 Management API, bulk user imports, SCIM, or JIT (for Social, Enterprise, or Passwordless connections). |
user.deleted |
Published each time a user is deleted. This event captures user deletions made through the Management API or as a result of deleting a connection. |
user.created
user.created
events are published each time a user is created. These events capture users created through a variety of channels, such as a signup page, the Management API, bulk user imports, SCIM, or just-in-time provisioning (JIT), for Social, Enterprise, or Passwordless connections.
{
"id": "evt_xxxxxxxx",
"source": "https://auth0.com/docs/v1beta1/user.created",
"specversion": "v1beta1",
"type": "user.created",
"time": "2025-01-29T21:02:03.873Z",
"data": {
"object": {
"created_at": "2025-01-29T21:02:03.87Z",
"email": "user@example.com",
"email_verified": false,
"identities": [
{
"connection": "Username-Password-Authentication",
"user_id": "xxxxxxxxxxxx",
"provider": "auth0",
"isSocial": false
}
],
"name": "user@example.com",
"nickname": "user123",
"picture": "example.png",
"updated_at": "2025-01-29T21:02:03.87Z",
"user_id": "auth0|xxxxxxxxxxxx",
"app_metadata": {
"custom_claim": "value"
},
"user_metadata": {
"favorite_color": "blue",
"preferred_language": "en"
},
"blocked": false,
"last_login": "2025-01-29T21:02:03.87Z",
"logins_count": 1,
"phone_number": "+1234567890",
"phone_verified": false,
"multifactor": ["google-authenticator"],
"last_ip": "192.168.1.1",
"email_verified_at": "2025-01-29T21:02:03.87Z",
"given_name": "John",
"family_name": "Doe"
}
}
}
Was this helpful?
Review the following sections for examples based on different methods of user creation.
Scenario: A user signs up through a Universal Login prompt using a database connection.
{
"id": "evt_123456789",
"source": "https://auth0.com/docs/v1beta1/user.created",
"specversion": "v1beta1",
"type": "user.created",
"time": "2025-01-29T21:02:03.873Z",
"data": {
"object": {
"created_at": "2025-01-29T21:02:03.87Z",
"email": "dbuser@example.com",
"email_verified": false,
"identities": [
{
"connection": "Username-Password-Authentication",
"user_id": "auth0|abc123",
"provider": "auth0",
"isSocial": false
}
],
"name": "dbuser@example.com",
"nickname": "dbuser",
"user_id": "auth0|abc123",
"app_metadata": {},
"user_metadata": {
"signup_source": "universal_login"
}
}
}
}
Was this helpful?
Scenario: A user associated with a database connection is created through the Management API.
{
"id": "evt_987654321",
"source": "https://auth0.com/docs/v1beta1/user.created",
"specversion": "v1beta1",
"type": "user.created",
"time": "2025-01-29T22:00:00.000Z",
"data": {
"object": {
"created_at": "2025-01-29T22:00:00.000Z",
"email": "admin-created@example.com",
"email_verified": false,
"identities": [
{
"connection": "Username-Password-Authentication",
"user_id": "auth0|admin123",
"provider": "auth0",
"isSocial": false
}
],
"user_id": "auth0|admin123",
"app_metadata": {
"created_by": "admin"
},
"user_metadata": {
"source": "management_api"
}
}
}
}
Was this helpful?
Scenario: A user signs up using a social connection such as Google.
{
"id": "evt_google123",
"source": "https://auth0.com/docs/v1beta1/user.created",
"specversion": "v1beta1",
"type": "user.created",
"time": "2025-01-30T00:30:00.000Z",
"data": {
"object": {
"created_at": "2025-01-30T00:30:00.000Z",
"email": "googleuser@example.com",
"email_verified": true,
"identities": [
{
"connection": "google-oauth2",
"user_id": "9876543210",
"provider": "google-oauth2",
"isSocial": true
}
],
"name": "Google User",
"nickname": "guser",
"user_id": "google-oauth2|9876543210",
"app_metadata": {},
"user_metadata": {
"signup_source": "google"
}
}
}
}
Was this helpful?
Scenario: A user signs up through a SAML SCIM connection.
{
"id": "evt_saml_scim123",
"source": "https://auth0.com/docs/v1beta1/user.created",
"specversion": "v1beta1",
"type": "user.created",
"time": "2025-01-30T02:10:00.000Z",
"data": {
"object": {
"created_at": "2025-01-30T02:10:00.000Z",
"email": "samluser@example.com",
"email_verified": true,
"identities": [
{
"connection": "my-saml-idp",
"user_id": "SAML-67890",
"provider": "samlp",
"isSocial": false
}
],
"user_id": "samlp|SAML-67890",
"app_metadata": {
"provisioned_by": "scim"
},
"user_metadata": {
"signup_source": "saml_scim"
}
}
}
}
Was this helpful?
user.updated
user.updated
events are published each time a user is updated. These events capture user updates made through a variety of channels, such as the user themselves after logging in, the Management API, bulk user imports (upsert), SCIM, or just-in-time provisioning (JIT), for Social, Enterprise, or Passwordless connections.
{
"id": "evt_xxxxxxxx",
"source": "https://auth0.com/docs/v1beta1/user.updated",
"specversion": "v1beta1",
"type": "user.updated",
"time": "2025-01-29T21:02:03.873Z",
"data": {
"object": {
"created_at": "2025-01-29T21:02:03.87Z",
"email": "user@example.com",
"email_verified": false,
"identities": [
{
"connection": "Username-Password-Authentication",
"user_id": "xxxxxxxxxxxx",
"provider": "auth0",
"isSocial": false
}
],
"name": "user@example.com",
"nickname": "user123",
"picture": "example.png",
"updated_at": "2025-01-29T21:02:03.87Z",
"user_id": "auth0|xxxxxxxxxxxx",
"app_metadata": {
"custom_claim": "value"
},
"user_metadata": {
"favorite_color": "blue",
"preferred_language": "en"
},
"blocked": false,
"last_login": "2025-01-29T21:02:03.87Z",
"logins_count": 1,
"phone_number": "+1234567890",
"phone_verified": false,
"multifactor": ["google-authenticator"],
"last_ip": "192.168.1.1",
"email_verified_at": "2025-01-29T21:02:03.87Z",
"given_name": "John",
"family_name": "Doe"
}
}
}
Was this helpful?
user.deleted
user.deleted
events publish each time a user is deleted. These events capture users deleted through the Management API or when a connection is deleted.
{
id: '42164d47-c292-4b21-9d93-c44c77ac237a',
source: 'https://auth0.com/docs/v1beta1/user.deleted',
specversion: 'v1beta1',
type: 'user.deleted',
time: '2025-01-07T19:56:03.546Z',
data: {
object: {
"user_id": "auth0|xxxxxxxxxxxx",
}
}
}
Was this helpful?