477 lines
10 KiB
Markdown
477 lines
10 KiB
Markdown
---
|
|
title: Directory Sync Webhook Events
|
|
sidebar_label: Events
|
|
---
|
|
|
|
# Events
|
|
|
|
SAML Jackson uses webhooks to notify your application any time changes are made to directory, users, groups, and memberships.
|
|
|
|
## User Events
|
|
|
|
We'll notify you of the following 3 events related to users. Each event will be sent to the webhook URL you've configured in the Directory Sync app.
|
|
|
|
<details>
|
|
<summary>user.created - New user has been assigned to the app.</summary>
|
|
<p>
|
|
|
|
```json
|
|
{
|
|
"directory_id": "58b5cd9dfaa39d47eb8f5f88631f9a629a232016",
|
|
"event": "user.created",
|
|
"tenant": "boxyhq",
|
|
"product": "jackson",
|
|
"data": {
|
|
"id": "038e767b-9bc6-4dbd-975e-fbc38a8e7d82",
|
|
"first_name": "Deepak",
|
|
"last_name": "Prabhakara",
|
|
"email": "deepak@boxyhq.com",
|
|
"active": true,
|
|
"raw": {
|
|
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
|
|
"userName": "deepak@boxyhq.com",
|
|
"name": {
|
|
"givenName": "Deepak",
|
|
"familyName": "Prabhakara"
|
|
},
|
|
"emails": [
|
|
{
|
|
"primary": true,
|
|
"value": "deepak@boxyhq.com",
|
|
"type": "work"
|
|
}
|
|
],
|
|
"title": "CEO",
|
|
"displayName": "Deepak Prabhakara",
|
|
"locale": "en-US",
|
|
"externalId": "00u1ldzzogFkXFmvT5d7",
|
|
"groups": [],
|
|
"active": true,
|
|
"id": "038e767b-9bc6-4dbd-975e-fbc38a8e7d82"
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
</p>
|
|
|
|
</details>
|
|
|
|
<details>
|
|
<summary>user.updated - A user's properties has been updated.</summary>
|
|
<p>
|
|
|
|
```json
|
|
{
|
|
"directory_id": "58b5cd9dfaa39d47eb8f5f88631f9a629a232016",
|
|
"event": "user.updated",
|
|
"tenant": "boxyhq",
|
|
"product": "jackson",
|
|
"data": {
|
|
"id": "ebc31d6e-7d62-4f81-b9e5-eb5f1a04ee92",
|
|
"first_name": "Kiran",
|
|
"last_name": "Krishnan",
|
|
"email": "kiran@boxyhq.com",
|
|
"active": true,
|
|
"raw": {
|
|
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
|
|
"userName": "kiran@boxyhq.com",
|
|
"name": {
|
|
"givenName": "Kiran",
|
|
"familyName": "Krishnan"
|
|
},
|
|
"emails": [
|
|
{
|
|
"primary": true,
|
|
"value": "kiran@boxyhq.com",
|
|
"type": "work"
|
|
}
|
|
],
|
|
"displayName": "Kiran Krishnan",
|
|
"addresses": [
|
|
{
|
|
"primary": true,
|
|
"region": "Kerala"
|
|
}
|
|
],
|
|
"locale": "en-US",
|
|
"externalId": "00u3e3cmpdDydXdzV5d7",
|
|
"active": true,
|
|
"id": "ebc31d6e-7d62-4f81-b9e5-eb5f1a04ee92",
|
|
"groups": []
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
</p>
|
|
</details>
|
|
|
|
<details>
|
|
<summary>user.deleted - A user has been removed from the Directory Provider.</summary>
|
|
<p>
|
|
|
|
```json
|
|
{
|
|
"directory_id": "58b5cd9dfaa39d47eb8f5f88631f9a629a232016",
|
|
"event": "user.deleted",
|
|
"tenant": "boxyhq",
|
|
"product": "jackson",
|
|
"data": {
|
|
"id": "ebc31d6e-7d62-4f81-b9e5-eb5f1a04ee92",
|
|
"first_name": "Kiran",
|
|
"last_name": "Krishnan",
|
|
"email": "kiran@boxyhq.com",
|
|
"active": false,
|
|
"raw": {
|
|
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
|
|
"userName": "kiran@boxyhq.com",
|
|
"name": {
|
|
"givenName": "Kiran",
|
|
"familyName": "Krishnan"
|
|
},
|
|
"emails": [
|
|
{
|
|
"primary": true,
|
|
"value": "kiran@boxyhq.com",
|
|
"type": "work"
|
|
}
|
|
],
|
|
"displayName": "Kiran Krishnan",
|
|
"addresses": [
|
|
{
|
|
"primary": true,
|
|
"region": "Kerala"
|
|
}
|
|
],
|
|
"locale": "en-US",
|
|
"externalId": "00u3e3cmpdDydXdzV5d7",
|
|
"active": false,
|
|
"id": "ebc31d6e-7d62-4f81-b9e5-eb5f1a04ee92",
|
|
"groups": []
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
</p>
|
|
</details>
|
|
|
|
## Group Events
|
|
|
|
We'll notify you of the following 5 events related to groups and memberships. Each event will be sent to the webhook URL you've configured in the Directory Sync app.
|
|
|
|
<details>
|
|
<summary>group.created - New group has been added to the app.</summary>
|
|
<p>
|
|
|
|
```json
|
|
{
|
|
"directory_id": "58b5cd9dfaa39d47eb8f5f88631f9a629a232016",
|
|
"event": "group.created",
|
|
"tenant": "boxyhq",
|
|
"product": "jackson",
|
|
"data": {
|
|
"id": "29e3adde-b4bb-45fc-bf65-2b44f29fd6f6",
|
|
"name": "dev",
|
|
"raw": {
|
|
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
|
|
"displayName": "dev",
|
|
"members": [],
|
|
"id": "29e3adde-b4bb-45fc-bf65-2b44f29fd6f6"
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
</p>
|
|
</details>
|
|
|
|
<details>
|
|
<summary>group.updated - A group's properties has been updated.</summary>
|
|
<p>
|
|
|
|
```json
|
|
{
|
|
"directory_id": "58b5cd9dfaa39d47eb8f5f88631f9a629a232016",
|
|
"event": "group.updated",
|
|
"tenant": "boxyhq",
|
|
"product": "jackson",
|
|
"data": {
|
|
"id": "29e3adde-b4bb-45fc-bf65-2b44f29fd6f6",
|
|
"name": "developers",
|
|
"raw": {
|
|
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
|
|
"displayName": "developers",
|
|
"members": [],
|
|
"id": "29e3adde-b4bb-45fc-bf65-2b44f29fd6f6"
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
</p>
|
|
</details>
|
|
|
|
<details>
|
|
<summary>group.deleted - A group has been removed from the app.</summary>
|
|
<p>
|
|
|
|
```json
|
|
{
|
|
"directory_id": "58b5cd9dfaa39d47eb8f5f88631f9a629a232016",
|
|
"event": "group.deleted",
|
|
"tenant": "boxyhq",
|
|
"product": "jackson",
|
|
"data": {
|
|
"id": "29e3adde-b4bb-45fc-bf65-2b44f29fd6f6",
|
|
"name": "developers",
|
|
"raw": {
|
|
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
|
|
"displayName": "developers",
|
|
"members": [],
|
|
"id": "29e3adde-b4bb-45fc-bf65-2b44f29fd6f6"
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
</p>
|
|
</details>
|
|
|
|
<details>
|
|
<summary>group.user_added - A user has been added to a directory group.</summary>
|
|
<p>
|
|
|
|
```json
|
|
{
|
|
"directory_id": "58b5cd9dfaa39d47eb8f5f88631f9a629a232016",
|
|
"event": "group.user_added",
|
|
"tenant": "boxyhq",
|
|
"product": "jackson",
|
|
"data": {
|
|
"id": "ebc31d6e-7d62-4f81-b9e5-eb5f1a04ee92",
|
|
"first_name": "Kiran",
|
|
"last_name": "Krishnan",
|
|
"email": "kiran@boxyhq.com",
|
|
"active": true,
|
|
"raw": {
|
|
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
|
|
"userName": "kiran@boxyhq.com",
|
|
"name": {
|
|
"givenName": "Kiran",
|
|
"familyName": "Krishnan"
|
|
},
|
|
"emails": [
|
|
{
|
|
"primary": true,
|
|
"value": "kiran@boxyhq.com",
|
|
"type": "work"
|
|
}
|
|
],
|
|
"displayName": "Kiran Krishnan",
|
|
"addresses": [
|
|
{
|
|
"primary": true,
|
|
"region": "Kerala"
|
|
}
|
|
],
|
|
"locale": "en-US",
|
|
"externalId": "00u3e3cmpdDydXdzV5d7",
|
|
"active": true,
|
|
"id": "ebc31d6e-7d62-4f81-b9e5-eb5f1a04ee92",
|
|
"title": "Developer",
|
|
"groups": []
|
|
},
|
|
"group": {
|
|
"id": "29e3adde-b4bb-45fc-bf65-2b44f29fd6f6",
|
|
"name": "developers",
|
|
"raw": {
|
|
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
|
|
"displayName": "developers",
|
|
"members": [],
|
|
"id": "29e3adde-b4bb-45fc-bf65-2b44f29fd6f6"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
</p>
|
|
</details>
|
|
|
|
<details>
|
|
<summary>group.user_removed - A user has been removed from a directory group.</summary>
|
|
<p>
|
|
|
|
```json
|
|
{
|
|
"directory_id": "58b5cd9dfaa39d47eb8f5f88631f9a629a232016",
|
|
"event": "group.user_removed",
|
|
"tenant": "boxyhq",
|
|
"product": "jackson",
|
|
"data": {
|
|
"id": "ebc31d6e-7d62-4f81-b9e5-eb5f1a04ee92",
|
|
"first_name": "Kiran",
|
|
"last_name": "Krishnan",
|
|
"email": "kiran@boxyhq.com",
|
|
"active": true,
|
|
"raw": {
|
|
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
|
|
"userName": "kiran@boxyhq.com",
|
|
"name": {
|
|
"givenName": "Kiran",
|
|
"familyName": "Krishnan"
|
|
},
|
|
"emails": [
|
|
{
|
|
"primary": true,
|
|
"value": "kiran@boxyhq.com",
|
|
"type": "work"
|
|
}
|
|
],
|
|
"displayName": "Kiran Krishnan",
|
|
"addresses": [
|
|
{
|
|
"primary": true,
|
|
"region": "Kerala"
|
|
}
|
|
],
|
|
"locale": "en-US",
|
|
"externalId": "00u3e3cmpdDydXdzV5d7",
|
|
"active": true,
|
|
"id": "ebc31d6e-7d62-4f81-b9e5-eb5f1a04ee92",
|
|
"title": "Developer",
|
|
"groups": []
|
|
},
|
|
"group": {
|
|
"id": "29e3adde-b4bb-45fc-bf65-2b44f29fd6f6",
|
|
"name": "developers",
|
|
"raw": {
|
|
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
|
|
"displayName": "developers",
|
|
"members": [],
|
|
"id": "29e3adde-b4bb-45fc-bf65-2b44f29fd6f6"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
</p>
|
|
</details>
|
|
|
|
## Directory Events
|
|
|
|
We'll notify you of the following 4 events related to the directory connections.
|
|
|
|
To configure the webhook, you have to set the following environment variables.
|
|
|
|
- `WEBHOOK_URL` - The URL to which the webhook events will be sent.
|
|
- `WEBHOOK_SECRET` - The secret key used to sign the webhook events.
|
|
|
|
<details>
|
|
<summary>
|
|
dsync.created - New connection has been created.
|
|
</summary>
|
|
<p>
|
|
|
|
```json
|
|
{
|
|
"event": "dsync.created",
|
|
"tenant": "boxyhq",
|
|
"product": "demo",
|
|
"data": {
|
|
"id": "d8aa6c93-c960-4925-9b31-4a4d2ad3bb44",
|
|
"name": "Okta Directory",
|
|
"type": "okta-scim-v2"
|
|
}
|
|
}
|
|
```
|
|
|
|
</p>
|
|
</details>
|
|
|
|
<details>
|
|
<summary>
|
|
dsync.deactivated - A connection has been deactivated.
|
|
</summary>
|
|
<p>
|
|
|
|
```json
|
|
{
|
|
"event": "dsync.deactivated",
|
|
"tenant": "boxyhq",
|
|
"product": "demo",
|
|
"data": {
|
|
"id": "d8aa6c93-c960-4925-9b31-4a4d2ad3bb44",
|
|
"name": "Okta Directory",
|
|
"type": "okta-scim-v2"
|
|
}
|
|
}
|
|
```
|
|
|
|
</p>
|
|
</details>
|
|
|
|
<details>
|
|
<summary>
|
|
dsync.activated - A connection has been activated.
|
|
</summary>
|
|
<p>
|
|
|
|
```json
|
|
{
|
|
"event": "dsync.activated",
|
|
"tenant": "boxyhq",
|
|
"product": "demo",
|
|
"data": {
|
|
"id": "d8aa6c93-c960-4925-9b31-4a4d2ad3bb44",
|
|
"name": "Okta Directory",
|
|
"type": "okta-scim-v2"
|
|
}
|
|
}
|
|
```
|
|
|
|
</p>
|
|
</details>
|
|
|
|
<details>
|
|
<summary>
|
|
dsync.deleted - A connection has been deleted.
|
|
</summary>
|
|
<p>
|
|
|
|
```json
|
|
{
|
|
"event": "dsync.deleted",
|
|
"tenant": "boxyhq",
|
|
"product": "demo",
|
|
"data": {
|
|
"id": "d8aa6c93-c960-4925-9b31-4a4d2ad3bb44",
|
|
"name": "Okta Directory",
|
|
"type": "okta-scim-v2"
|
|
}
|
|
}
|
|
```
|
|
|
|
</p>
|
|
</details>
|
|
|
|
## Frequently Asked Questions
|
|
|
|
### How to determine whether a user has been deleted if the Identity Provider does not send a webhook event for user deletion?
|
|
|
|
To receive notifications when a user is deleted, it's important to note that not all Identity Providers send requests for this. However, you can listen for the `user.updated` event from SAML Jackson and examine the `active` property to determine whether a user has been deleted. In case the user is deleted, the `active` property will be assigned the value `false`.
|
|
|
|
### Which Identity Providers do not send an event for user deletion?
|
|
|
|
Following Identity Providers do not send `user.deleted` event:
|
|
|
|
- Okta
|
|
- Azure AD
|
|
|
|
### Which SCIM version does SAML Jackson support?
|
|
|
|
At the moment, SAML Jackson supports SCIM version 2.0.
|