Microsoft Entra 이벤트

이 문서에서는 Microsoft Graph API에서 게시되는 Microsoft Entra 이벤트에 대한 속성과 스키마를 제공합니다. 이벤트 스키마에 대한 소개는 CloudEvents 스키마를 참조하세요.

사용할 수 있는 이벤트 유형

이러한 이벤트는 사용자 또는 그룹이 Microsoft Entra ID에서 생성, 업데이트 또는 삭제될 때 또는 Microsoft Graph API를 사용하여 해당 리소스를 통해 작동할 때 트리거됩니다.

이벤트 이름 설명
Microsoft.Graph.UserUpdated Microsoft Entra ID의 사용자를 만들거나 업데이트할 때 트리거됩니다.
Microsoft.Graph.UserDeleted Microsoft Entra ID의 사용자가 영구적으로 삭제될 때 트리거됩니다.
Microsoft.Graph.GroupUpdated Microsoft Entra ID의 그룹을 만들거나 업데이트할 때 트리거됩니다.
Microsoft.Graph.GroupDeleted Microsoft Entra ID의 그룹이 영구적으로 삭제될 때 트리거됩니다.

참고 항목

기본적으로 사용자 또는 그룹 삭제는 일시 삭제 작업일 뿐입니다. 즉, 사용자 또는 그룹이 삭제된 것으로 표시되어도 사용자 또는 그룹 개체는 여전히 존재할 수 있습니다. Microsoft Graph는 사용자가 일시 삭제될 때 업데이트된 이벤트를 보냅니다. 사용자를 영구 삭제하려면 Azure Portal에서 사용자 삭제 페이지로 이동하여 영구 삭제를 선택합니다. 그룹을 영구적으로 삭제하는 단계는 이와 비슷합니다.

예제 이벤트

이벤트가 트리거될 때 Event Grid 서비스는 해당 이벤트에 대한 데이터를 구독 대상으로 보냅니다. 이 섹션에는 각 Microsoft Entra 이벤트에서 데이터가 표시되는 방법에 대한 예제가 포함되어 있습니다.

Microsoft.Graph.UserUpdated 이벤트

{
  "id": "00d8a100-2e92-4bfa-86e1-0056dacd0fce",
  "type": "Microsoft.Graph.UserUpdated",
  "source": "/tenants/<tenant-id>/applications/<application-id>",
  "subject": "Users/<user-id>",
  "time": "2022-05-24T22:24:31.3062901Z",
  "datacontenttype": "application/json",
  "specversion": "1.0",
  "data": {
    "changeType": "updated",
    "clientState": "<guid>",
    "resource": "Users/<user-id>",
    "resourceData": {
      "@odata.type": "#Microsoft.Graph.User",
      "@odata.id": "Users/<user-id>",
      "id": "<user-id>",
      "organizationId": "<tenant-id>",
      "eventTime": "2022-05-24T22:24:31.3062901Z",
      "sequenceNumber": <sequence-number>
    },
    "subscriptionExpirationDateTime": "2022-05-24T23:21:19.3554403+00:00",
    "subscriptionId": "<microsoft-graph-subscription-id>",
    "tenantId": "<tenant-id>
  }
}

Microsoft.Graph.UserDeleted 이벤트

{
  "id": "00d8a100-2e92-4bfa-86e1-0056dacd0fce",
  "type": "Microsoft.Graph.UserDeleted",
  "source": "/tenants/<tenant-id>/applications/<application-id>",
  "subject": "Users/<user-id>",
  "time": "2022-05-24T22:24:31.3062901Z",
  "datacontenttype": "application/json",
  "specversion": "1.0",
  "data": {
    "changeType": "deleted",
    "clientState": "<guid>",
    "resource": "Users/<user-id>",
    "resourceData": {
      "@odata.type": "#Microsoft.Graph.User",
      "@odata.id": "Users/<user-id>",
      "id": "<user-id>",
      "organizationId": "<tenant-id>",
      "eventTime": "2022-05-24T22:24:31.3062901Z",
      "sequenceNumber": <sequence-number>
    },
    "subscriptionExpirationDateTime": "2022-05-24T23:21:19.3554403+00:00",
    "subscriptionId": "<microsoft-graph-subscription-id>",
    "tenantId": "<tenant-id>
  }
}

Microsoft.Graph.GroupUpdated 이벤트

{
  "id": "00d8a100-2e92-4bfa-86e1-0056dacd0fce",
  "type": "Microsoft.Graph.GroupUpdated",
  "source": "/tenants/<tenant-id>/applications/<application-id>",
  "subject": "Groups/<group-id>",
  "time": "2022-05-24T22:24:31.3062901Z",
  "datacontenttype": "application/json",
  "specversion": "1.0",
  "data": {
    "changeType": "updated",
    "clientState": "<guid>",
    "resource": "Groups/<group-id>",
    "resourceData": {
      "@odata.type": "#Microsoft.Graph.Group",
      "@odata.id": "Groups/<group-id>",
      "id": "<group-id>",
      "organizationId": "<tenant-id>",
      "eventTime": "2022-05-24T22:24:31.3062901Z",
      "sequenceNumber": <sequence-number>
    },
    "subscriptionExpirationDateTime": "2022-05-24T23:21:19.3554403+00:00",
    "subscriptionId": "<microsoft-graph-subscription-id>",
    "tenantId": "<tenant-id>
  }
}

Microsoft.Graph.GroupDeleted 이벤트

{
  "id": "00d8a100-2e92-4bfa-86e1-0056dacd0fce",
  "type": "Microsoft.Graph.GroupDeleted",
  "source": "/tenants/<tenant-id>/applications/<application-id>",
  "subject": "Groups/<group-id>",
  "time": "2022-05-24T22:24:31.3062901Z",
  "datacontenttype": "application/json",
  "specversion": "1.0",
  "data": {
    "changeType": "deleted",
    "clientState": "<guid>",
    "resource": "Groups/<group-id>",
    "resourceData": {
      "@odata.type": "#Microsoft.Graph.Group",
      "@odata.id": "Groups/<group-id>",
      "id": "<group-id>",
      "organizationId": "<tenant-id>",
      "eventTime": "2022-05-24T22:24:31.3062901Z",
      "sequenceNumber": <sequence-number>
    },
    "subscriptionExpirationDateTime": "2022-05-24T23:21:19.3554403+00:00",
    "subscriptionId": "<microsoft-graph-subscription-id>",
    "tenantId": "<tenant-id>
  }
}

이벤트 속성

이벤트에는 다음과 같은 최상위 데이터가 있습니다.

속성 Type Description
source string 테넌트 이벤트 원본입니다. 이 필드는 쓸 수 없습니다. Microsoft Graph API는 이 값을 제공합니다.
subject string 게시자가 정의한 이벤트 주체의 경로입니다.
type string 이 이벤트 원본에 대한 이벤트 유형 중 하나입니다.
time string 공급자의 UTC 시간을 기준으로 이벤트가 생성된 시간
id string 이벤트에 대한 고유 식별자입니다.
data 개체 리소스 상태 변경에 대한 데이터를 제공하는 이벤트 페이로드입니다.
specversion string CloudEvents 스키마 사양 버전입니다.

데이터 개체의 속성은 다음과 같습니다.

속성 Type Description
changeType string 리소스 상태 변경의 유형입니다.
resource string 이벤트가 발생한 리소스 식별자입니다.
tenantId string 사용자 또는 그룹이 보관되는 조직 ID입니다.
clientState string Graph API 구독을 만들 때 사용자가 제공한 비밀입니다.
@odata.type string Graph API 변경 형식입니다.
@odata.id string 이벤트가 발생한 Graph API 리소스 식별자입니다.
id string 이벤트가 발생한 리소스 식별자입니다.
organizationId string Microsoft Entra 테넌트 식별자.
eventTime string 리소스 상태가 변경된 시간입니다.
sequenceNumber string 시퀀스 번호
subscriptionExpirationDateTime string Graph API 구독이 만료되는 RFC 3339 형식의 시간입니다.
subscriptionId string Graph API 구독 식별자입니다.
tenantId string Microsoft Entra 테넌트 식별자.

다음 단계