User events
User events notify you when user accounts are created, updated, deleted, or when users complete registration. When a user event is triggered, IDaaS sends an HTTP POST request to your configured webhook URL with a JSON payload containing the event details.
Payload structure
Every user event payload has this structure:
{
"id": "770fa622-94bd-43f6-c938-668877662222",
"type": "user.created",
"accountId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"eventTime": "2024-03-15T10:00:00.000Z",
"data": {
// Event-specific data here
}
}
The data object contains event-specific fields. See the event examples later on this page for the full data object for each event type.
Top-level fields
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for this webhook delivery |
type | string | The event that occurred (e.g., user.created) |
accountId | string | Your account identifier |
eventTime | string | When the event occurred (ISO 8601 format) |
data | object | Details about what happened (varies by event type) |
Event types
user.created
Triggered when an administrator creates a new user account.
Example payload:
{
"id": "770fa622-94bd-43f6-c938-668877662222",
"type": "user.created",
"accountId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"eventTime": "2024-03-15T10:00:00.000Z",
"data": {
"subject": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"subjectName": "adminuser",
"subjectType": "USER",
"resourceName": "Administration Portal",
"sourceIp": "192.168.1.50",
"subscriberAdminRoleName": "System Administrator",
"entityType": "USERS",
"entityId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"entityName": "janesmith",
"entityAttributes": {
"userId": "janesmith",
"firstName": "Jane",
"lastName": "Smith",
"email": "janesmith@example.com"
}
}
}
The data object includes the following fields:
| Field | Description |
|---|---|
subject | ID of the admin who created the user |
subjectName | Username of the admin who created the user |
subjectType | Always USER for admin actions |
resourceName | Where the action was performed (e.g., "Administration Portal") |
sourceIp | IP address of the admin |
subscriberAdminRoleName | The admin's role (e.g., "System Administrator") |
entityType | Always USERS for user events |
entityId | ID of the newly created user |
entityName | Username of the newly created user |
entityAttributes | Details about the new user (see below) |
The entityAttributes object always includes these fields:
userId- The usernamefirstName- First namelastName- Last nameemail- Email address
user.updated
Triggered when an administrator modifies a user account.
Example payload:
{
"id": "aa0ad955-a7ea-96a9-f26b-99bb00995555",
"type": "user.updated",
"accountId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"eventTime": "2024-03-15T11:20:00.000Z",
"data": {
"subject": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"subjectName": "adminuser",
"subjectType": "USER",
"resourceName": "Administration Portal",
"sourceIp": "192.168.1.50",
"subscriberAdminRoleName": "System Administrator",
"entityType": "USERS",
"entityId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"entityName": "janesmith",
"entityAttributes": {
"mobile": "+1-555-123-4567",
"lastName": "Smith-Johnson",
"groups": ["Engineering", "Security Team"],
"customUserAliases": ["jsmith"]
}
}
}
This event uses the same data structure as user.created, but entityAttributes contains only the fields that changed.
In the example above, only these fields were updated:
mobile- Phone number was added or changedlastName- Last name was changedgroups- Group membership was updatedcustomUserAliases- Aliases were added or changed
Any user field can appear here if it was modified.
user.deleted
Triggered when an administrator deletes a user account.
Example payload:
{
"id": "880ab733-a5ce-74a7-d049-779988773333",
"type": "user.deleted",
"accountId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"eventTime": "2024-03-15T16:45:00.000Z",
"data": {
"subject": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"subjectName": "adminuser",
"subjectType": "USER",
"resourceName": "Administration Portal",
"sourceIp": "192.168.1.50",
"subscriberAdminRoleName": "System Administrator",
"entityType": "USERS",
"entityId": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"entityName": "olduser"
}
}
This event uses the same data structure as other user events, but does not include the entityAttributes field.
All information about the deleted user is in:
entityId- ID of the deleted userentityName- Username of the deleted user
user.registration.completed
Triggered when a user completes their account registration.
Example payload:
{
"id": "990ac844-a6df-85a8-e15a-88aa99884444",
"type": "user.registration.completed",
"accountId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"eventTime": "2024-03-15T09:30:00.000Z",
"data": {
"subject": "d4e5f6a7-b8c9-0123-abcd-456789012345",
"subjectName": "newuser",
"subjectType": "USER",
"resourceName": "User Portal",
"sourceIp": "203.0.113.42",
"entityType": "USERS",
"entityId": "d4e5f6a7-b8c9-0123-abcd-456789012345",
"entityName": "newuser",
"entityAttributes": {
"registrationRequired": false
}
}
}
The data object includes the following fields:
| Field | Description |
|---|---|
subject | ID of the user who completed registration |
subjectName | Username of the user who completed registration |
subjectType | Always USER |
resourceName | Where registration was completed (e.g., "User Portal") |
sourceIp | IP address of the user |
entityType | Always USERS |
entityId | ID of the user (same as subject) |
entityName | Username (same as subjectName) |
entityAttributes | Contains registrationRequired: false |
Key differences from other events:
- No
subscriberAdminRoleName- This is a user-initiated action, not an admin action subjectis the user themselves - In other events,subjectis the admin who performed the action