Skip to main content

Description

This hook is triggered when a new user is created in the authentication system.

Integration Details

  • Subscription Key: auth.user.created
  • Use Case: Automatically provision access in your internal systems or send a “Welcome” email.
  • Related Events: auth.user.updated

Trigger

  • Event Type: auth_user_created
  • Source: Insertion of a record into the auth.user table.

Payload Example

{
  "id": 123,
  "is_deleted": false,
  "external_id": "ext_u_123",
  "old_id": 567,
  "identity_id": "auth0|abc",
  "is_active": true,
  "azure_object_id": "00000000-0000-0000-0000-000000000000",
  "name": "John Doe",
  "username": "johndoe",
  "email": "john.doe@example.com",
  "user_roles": [
    {
      "id": 1,
      "role": "admin",
      "created_at": "2023-10-01T12:00:00Z"
    }
  ],
  "groups": [
    {
      "id": 1,
      "group_id": 10,
      "groupByName": {
        "name": "Engineering"
      }
    }
  ],
  "profile_pic_file_id": 1001,
  "timezone": "UTC",
  "phone_number": "+1234567890",
  "tenant_id": 1,
  "created_at": "2023-10-01T12:00:00Z",
  "created_by": 1,
  "updated_by": 1,
  "updated_at": "2023-10-01T12:00:00Z"
}

Payload Type Showcase

{
  id: number;
  is_deleted: boolean;
  external_id: string | null;
  old_id: number | null;
  identity_id: string;
  is_active: boolean;
  azure_object_id: string | null;
  name: string;
  username: string;
  email: string;
  user_roles: {
    id: number;
    role: string;
    created_at: string;
  }[];
  groups: {
    id: number;
    group_id: number;
    groupByName: {
      name: string;
    };
  }[];
  profile_pic_file_id: number | null;
  timezone: string | null;
  phone_number: string;
  tenant_id: number;
  created_at: string;
  created_by: number;
  updated_by: number | null;
  updated_at: string;
}