Skip to main content

Entra ID schema reference

Access Analyzer stores Entra ID scan data in the access_analyzer ClickHouse database. The tables below are populated when you set up an Entra ID source group and run a scan. Use this reference when querying scan data directly or integrating Access Analyzer data with external tools.

Entra ID data is stored in shared tables that serve multiple connector types. Each row is scoped to your tenant using the tenancyReference column, which corresponds to your Entra ID tenant.

note

All tables use the ReplacingMergeTree engine. Duplicate rows with the same primary key are deduplicated at merge time. Use the FINAL keyword or query the available _latest views to return only the most recent version of each record.

Metadata columns

All tables include the following columns populated by Access Analyzer during each scan:

ColumnTypeDescription
tenancyReferenceUUIDIdentifier of the Entra ID tenant that produced this record.
connectorReferenceUUIDIdentifier of the connector job run.
fullCrawlTimestampUtcDateTime64(6)Timestamp of the most recent full sync for this tenant.
crawlTimestampUtcDateTime64(6)Timestamp when this record was written. Used as the version column for deduplication.

Tables

principals

Stores users, groups, and roles synced from the Entra ID tenant. Each row represents one identity object.

Primary key: entityId

Core identity fields

ColumnTypeDescription
entityIdUUIDUnique identifier for this identity object within Access Analyzer.
sourceSystemIdStringObject ID from Entra ID (the Azure AD objectId).
nameStringInternal name of the object.
displayNameStringDisplay name as it appears in Entra ID.
emailAddressNullable(String)Optional. Primary email address.
firstNameNullable(String)Optional. Given name (users only).
lastNameNullable(String)Optional. Surname (users only).
isDeletedBoolWhether the object has been soft-deleted.
deletedDateNullable(DateTime64(6))Optional. Timestamp when the object was deleted.
lastModifiedNullable(DateTime64(6))Optional. Timestamp of the most recent change.
lastActiveNullable(DateTime64(6))Optional. Timestamp of the most recent sign-in activity.

User-specific fields

ColumnTypeDescription
azureAdUserPrincipalNameNullable(String)Optional. User principal name (UPN) in user@domain format.
azureAdUserTypeNullable(String)Optional. Type of user account: Member or Guest.
azureAdMfaConfiguredNullable(Bool)Optional. Whether MFA is configured for the user.
disabledNullable(Bool)Optional. Whether the user account is disabled.
departmentNullable(String)Optional. Department attribute from Entra ID.
jobTitleNullable(String)Optional. Job title attribute from Entra ID.
lastDirSyncTimeNullable(DateTime64(6))Optional. Last directory sync timestamp for hybrid-joined accounts.

Group-specific fields

ColumnTypeDescription
azureAdGroupTypeNullable(String)Optional. Group type: Security, Distribution, or M365.
isSecurityEnabledNullable(Bool)Optional. Whether the group is security-enabled.
isMailEnabledNullable(Bool)Optional. Whether the group is mail-enabled.
memberCountNullable(Int32)Optional. Number of direct members.
dynamicMembershipEnabledNullable(Bool)Optional. Whether the group uses dynamic membership rules.

Role-specific fields

ColumnTypeDescription
azureRoleTemplateIdNullable(String)Optional. Stable template ID for built-in roles (consistent across tenants).
azureRoleAllowedPrincipalTypesNullable(String)Optional. Principal types that can be assigned to this role.

memberships

Stores group membership records — both direct and nested. Each row represents one membership relationship.

Primary key: (groupId, memberId, role)

ColumnTypeDescription
groupIdUUIDentityId of the group. Joins to principals.entityId.
memberIdUUIDentityId of the member (user, group, or service principal). Joins to principals.entityId.
membershipSourceStringHow the membership was established: Direct, Nested, or Dynamic.
roleStringRole of the member within the group: Owner, Member, or Guest.
expandedFromGroupIdNullable(UUID)Optional. For nested memberships, the intermediate group through which this membership was resolved.
isDeletedBoolWhether this membership record has been removed.

sensitivity_labels

Stores Microsoft Information Protection (MIP) sensitivity labels retrieved from the tenant during an Entra ID scan.

Primary key: sensitivitylabelId

ColumnTypeDescription
sensitivitylabelIdUUIDUnique identifier for this label within Access Analyzer.
nameStringInternal name of the label.
displayNameStringDisplay name shown to users in Microsoft 365 applications.
descriptionNullable(String)Optional. Description of the label's purpose.
isActiveBoolWhether the label is currently active in the tenant.
isDeletedBoolWhether the label has been deleted.
classificationLevelNullable(String)Optional. Classification level assigned to the label.
priorityInt32Display order priority. Lower values appear first.
parentLabelIdNullable(UUID)Optional. For sublabels, the sensitivitylabelId of the parent label.
labelIdNullable(String)Microsoft GUID for the label as defined in Microsoft Purview.
note

Labels stored here are the source data for MIP label mapping in Configuration > Sensitive Data. After mapping labels to sensitive data types, they are available for detection during File Server and SharePoint Online scans.