Table of contents
Access Control
Download API definition:

The following events are available for the Access Control API. To set up automation based on these events, create a webhook using the Webhooks API.

Available Events

All events sent to the callback url will be in the body of a POST request. This post request will contain properties that will be included on every request, regardless of event type. These include content, eventType, enqueuedDateTime, iTwinId, messageId, and webhookId. The content will vary based on what event has been received. See below for a list of properties included inside the content for each event type.
The following is an example of what will be received for an event.
Properties
Name
Type
Description
content
Object

Event content.

Base Event eventType

Event webhook event type.

enqueuedDateTime
String

Date and time when event was enqueued.

iTwinId
String

iTwin Id.

messageId
String

Event message Id.

webhookId
String

Webhook Id.

Example
JSON
{
    "content": {
      // event specific properties go here    
    },
    "eventType": "api.action.version",
    "Base Event eventType":"base-event-eventType",
    "enqueuedDateTime":"string",
    "iTwinId":"string",
    "messageId":"string",
    "webhookId":"string"
}
Access Control Events

Event that gets triggered when a member is added to an iTwin.
Properties
Name
Type
Description
memberId
String

Globally Unique Identifier of the member.

eventCreatedBy
String

Globally Unique Identifier of the user added the member.

memberType
String

Type of member.

roleId
String

Globally Unique Identifier of the role the member was assigned.

roleName
String

Name of the role the member was assigned.

Example
JSON
{
   "content": {
        "memberId":"e5c7ae4f-2d72-4319-b96a-d46492e4f860",
        "eventCreatedBy":"6411cfcf-d188-4788-9267-43eb0f208c8e",
        "memberType":"User",
        "roleId":"d42d3349-1117-41cb-b2c4-7afff1f80d23",
        "roleName":"Viewer"
    },
    "eventType": "accessControl.memberAdded.v1",
    "Base Event eventType":"undefined",
    "enqueuedDateTime":"11/3/2023 8:07:01 PM",
    "iTwinId":"ce40a55a-6954-4de3-85c7-f796c3e423d9",
    "messageId":"32369e4b-c9ff-47e4-b422-83b97247ce5b",
    "webhookId":"7da4ba7e-3a35-4d97-a1b0-6d453aa97493"
}
Event that gets triggered when a member is removed from an iTwin.
Properties
Name
Type
Description
memberId
String

Globally Unique Identifier of the member.

eventCreatedBy
String

Globally Unique Identifier of the user who removed the member.

memberType
String

Type of member.

Example
JSON
{
   "content": {
        "memberId":"e5c7ae4f-2d72-4319-b96a-d46492e4f860",
        "eventCreatedBy":"6411cfcf-d188-4788-9267-43eb0f208c8e",
        "memberType":"User"
    },
    "eventType": "accessControl.memberRemoved.v1",
    "Base Event eventType":"undefined",
    "enqueuedDateTime":"11/3/2023 8:07:01 PM",
    "iTwinId":"ce40a55a-6954-4de3-85c7-f796c3e423d9",
    "messageId":"32369e4b-c9ff-47e4-b422-83b97247ce5b",
    "webhookId":"7da4ba7e-3a35-4d97-a1b0-6d453aa97493"
}
Event that gets triggered when a role is assigned to a member.
Properties
Name
Type
Description
memberId
String

Globally Unique Identifier of the member.

eventCreatedBy
String

Globally Unique Identifier of the user who assigned the role.

memberType
String

Type of member.

roleId
String

Globally Unique Identifier of the role the member was assigned.

roleName
String

Name of the role the member was assigned.

Example
JSON
{
   "content": {
        "memberId":"e5c7ae4f-2d72-4319-b96a-d46492e4f860",
        "eventCreatedBy":"6411cfcf-d188-4788-9267-43eb0f208c8e",
        "memberType":"User",
        "roleId":"d42d3349-1117-41cb-b2c4-7afff1f80d23",
        "roleName":"Viewer"
    },
    "eventType": "accessControl.roleAssigned.v1",
    "Base Event eventType":"undefined",
    "enqueuedDateTime":"11/3/2023 8:07:01 PM",
    "iTwinId":"ce40a55a-6954-4de3-85c7-f796c3e423d9",
    "messageId":"32369e4b-c9ff-47e4-b422-83b97247ce5b",
    "webhookId":"7da4ba7e-3a35-4d97-a1b0-6d453aa97493"
}
Event that gets triggered when a role is unassigned to a member.
Properties
Name
Type
Description
memberId
String

Globally Unique Identifier of the member.

eventCreatedBy
String

Globally Unique Identifier of the user who unassigned the role.

memberType
String

Type of member.

roleId
String

Globally Unique Identifier of the role the member was assigned.

roleName
String

Name of the role the member was assigned.

Example
JSON
{
   "content": {
        "memberId":"e5c7ae4f-2d72-4319-b96a-d46492e4f860",
        "eventCreatedBy":"6411cfcf-d188-4788-9267-43eb0f208c8e",
        "memberType":"User",
        "roleId":"d42d3349-1117-41cb-b2c4-7afff1f80d23",
        "roleName":"Viewer"
    },
    "eventType": "accessControl.roleUnassigned.v1",
    "Base Event eventType":"undefined",
    "enqueuedDateTime":"11/3/2023 8:07:01 PM",
    "iTwinId":"ce40a55a-6954-4de3-85c7-f796c3e423d9",
    "messageId":"32369e4b-c9ff-47e4-b422-83b97247ce5b",
    "webhookId":"7da4ba7e-3a35-4d97-a1b0-6d453aa97493"
}

We are currently working on expanding our events and would appreciate your feedback on what events we are missing.

Was this page helpful?