Model Reference

Sync API record properties, types, and requiredness for the C# and Python SDKs.

Last updated

Use the language selector to view the public names and types exposed by each SDK.

Requiredness describes Sync API expectations; Protobuf does not enforce required fields on the wire.

Accounts

Accounts are snapshot-backed records representing users inside a connected product.

Account

PropertyPropertyTypeTypeRequiredDescription
GenericgenericGenericAccountDetailsGenericAccountDetailsExactly oneProvider-neutral account details

GenericAccountDetails

PropertyPropertyTypeTypeRequiredDescription
IdidstringstrYesStable source account identifier
NamenamestringstrNoDisplay name
EmailemailstringstrNoPrimary email
UsernameusernamestringstrNoSource username
ActiveactiveboolboolNoWhether the account is active
RolesrolesRepeatedField<string>list[str]NoRoles assigned in the source
DetailsdetailsAccountDetailsAccountDetailsNoVendor metadata
TypetypestringstrNoSource-defined account type

AccountDetails

PropertyPropertyTypeTypeRequiredDescription
MicrosoftmicrosoftMicrosoftAccountDetailsMicrosoftAccountDetailsExactly oneMicrosoft-specific metadata when vendor details are present
MicrosoftAccountDetails.TeamsMicrosoftAccountDetails.teamsTeamsMetadataTeamsMetadataNoMicrosoft Teams metadata
TeamsMetadata.HasTeamsTeamsMetadata.has_teamsboolboolYesWhether the account has Teams

Plans and Licenses

Plans and licenses are snapshot-backed. A license associates a source account with a source plan.

Plan

PropertyPropertyTypeTypeRequiredDescription
GenericgenericGenericPlanDetailsGenericPlanDetailsExactly oneProvider-neutral plan details

GenericPlanDetails

PropertyPropertyTypeTypeRequiredDescription
IdidstringstrYesStable source plan identifier
ExternalPlanNameexternal_plan_namestringstrYesSource plan name
ExternalProductNameexternal_product_namestringstrNoProduct name when the source contains multiple products
AttributesattributesMapField<string, string>dict[str, str]NoSource-specific metadata
DetailsdetailsPlanDetailsPlanDetailsYesSubscription details

PlanDetails

PropertyPropertyTypeTypeRequiredDescription
ModelmodelSubscriptionModelSubscriptionModelYesSubscription model
SeatBasedseat_basedSeatBasedSubscriptionModelSeatBasedSubscriptionModelConditionalRequired when Model is seat-based
SeatBased.PaidSeatsseat_based.paid_seatsintintNoPurchased seats
SeatBased.ConsumedSeatsseat_based.consumed_seatsintintNoAssigned or consumed seats

License

PropertyPropertyTypeTypeRequiredDescription
GenericgenericGenericLicenseDetailsGenericLicenseDetailsExactly oneProvider-neutral license details

GenericLicenseDetails

PropertyPropertyTypeTypeRequiredDescription
SourceIdsource_idstringstrYesStable license or assignment identifier
SourceAccountIdsource_account_idstringstrYesReferenced account identifier
SourcePlanIdsource_plan_idstringstrYesReferenced plan identifier
BillablebillableboolboolYesWhether the assignment consumes a paid entitlement
ExternalProductIdexternal_product_idstringstrNoSource product identifier

SubscriptionModel

C#PythonDescription
UnspecifiedSUBSCRIPTION_MODEL_UNSPECIFIEDNo subscription model selected
SeatBasedSUBSCRIPTION_MODEL_SEAT_BASEDSeat-based subscription

Usage

Usage records are event-based. Their absence from a later batch does not remove earlier events.

Usage

PropertyPropertyTypeTypeRequiredDescription
GenericgenericGenericUsageDetailsGenericUsageDetailsExactly oneProvider-neutral usage details

GenericUsageDetails

PropertyPropertyTypeTypeRequiredDescription
IdidstringstrYesStable usage-event identifier
SourceActorIdsource_actor_idstringstrYesAccount or employee responsible for the activity
ExternalProductNameexternal_product_namestringstrNoProduct in which activity occurred
SourcePlanIdsource_plan_idstringstrNoRelated plan identifier
LastActivitylast_activityTimestampdatetime | TimestampYesMost recent activity time

ExternallyDiscoveredUsage

PropertyPropertyTypeTypeRequiredDescription
GenericgenericGenericExternallyDiscoveredUsageDetailsGenericExternallyDiscoveredUsageDetailsExactly oneProvider-neutral discovered-usage details

GenericExternallyDiscoveredUsageDetails

PropertyPropertyTypeTypeRequiredDescription
SourceActorIdsource_actor_idstringstrYesStable actor identifier
ActorEmailactor_emailstringstrNoActor email when known
ExternalProductNameexternal_product_namestringstrNoDiscovered product
SourcesourcestringstrNoDiscovery source
LastActivitylast_activityTimestampdatetime | TimestampConditionalProvide this or the complete activity range
LastActivityFromlast_activity_fromTimestampdatetime | TimestampConditionalRange start; requires the range end
LastActivityTolast_activity_toTimestampdatetime | TimestampConditionalRange end; requires the range start

Employees

Employees are snapshot-backed. Select the details model that matches the source data.

Employee

PropertyPropertyTypeTypeRequiredDescription
GenericgenericGenericEmployeeDetailsGenericEmployeeDetailsExactly oneProvider-neutral or normalized employee
MicrosoftmicrosoftMicrosoftEmployeeDetailsMicrosoftEmployeeDetailsExactly oneMicrosoft Graph user
GooglegoogleGoogleEmployeeDetailsGoogleEmployeeDetailsExactly oneGoogle Directory user
OktaoktaOktaEmployeeDetailsOktaEmployeeDetailsExactly oneOkta user
BambooHrbamboo_hrBambooHrEmployeeDetailsBambooHrEmployeeDetailsExactly oneBambooHR employee

GenericEmployeeDetails

PropertyPropertyTypeTypeRequiredDescription
IdidstringstrYesStable source employee identifier
FullNamefull_namestringstrYesDisplay name
FirstNamefirst_namestringstrNoGiven name
LastNamelast_namestringstrNoFamily name
EmailemailstringstrNoPrimary email
EmailAliasesemail_aliasesRepeatedField<string>list[str]NoAlternate emails
ActiveactiveboolboolNoWhether the employee is active
DeleteddeletedboolboolNoWhether the employee was deleted
DeletionTimedeletion_timeTimestampdatetime | TimestampNoSource deletion time
CreationTimecreation_timeTimestampdatetime | TimestampNoSource creation time
AvatarUrlavatar_urlstringstrNoProfile image URL
OrgUnitorg_unitstringstrNoOrganizational unit
DepartmentPathdepartment_pathRepeatedField<string>list[str]NoDepartment hierarchy
JobTitlejob_titlestringstrNoJob title
CountrycountrystringstrNoCountry
DivisiondivisionstringstrNoDivision
CostCentercost_centerstringstrNoCost center
UserTypeuser_typestringstrNoSource-defined employee type
ManagerIdmanager_idstringstrNoSource manager identifier
HasMailboxhas_mailboxboolboolNoWhether the employee has a mailbox
AttributesattributesMapField<string, string>dict[str, str]NoSource-specific metadata

MicrosoftEmployeeDetails

PropertyPropertyTypeTypeRequiredDescription
IdidstringstrYesMicrosoft user identifier
DisplayNamedisplay_namestringstrYesDisplay name
UserPrincipalNameuser_principal_namestringstrYesUser principal name
GivenNamegiven_namestringstrNoGiven name
SurnamesurnamestringstrNoFamily name
MailmailstringstrNoPrimary email
DepartmentdepartmentstringstrNoDepartment
AccountEnabledaccount_enabledboolboolNoWhether the account is enabled
CreatedDateTimecreated_date_timeTimestampdatetime | TimestampNoCreation time
DeletedDateTimedeleted_date_timeTimestampdatetime | TimestampNoDeletion time
JobTitlejob_titlestringstrNoJob title
UserTypeuser_typestringstrNoMicrosoft user type
CountrycountrystringstrNoCountry
EmployeeOrgDataemployee_org_dataMicrosoftEmployeeOrgDataMicrosoftEmployeeOrgDataNoDivision and cost-center data
ManagerIdmanager_idstringstrNoMicrosoft manager identifier

MicrosoftEmployeeOrgData exposes optional Division / division and CostCenter / cost_center strings.

GoogleEmployeeDetails

PropertyPropertyTypeTypeRequiredDescription
IdidstringstrYesGoogle user identifier
NamenameGoogleEmployeeNameGoogleEmployeeNameYesFull, given, and family names; all three are required
PrimaryEmailprimary_emailstringstrYesPrimary email
AliasesaliasesRepeatedField<string>list[str]NoAlternate emails
ThumbnailPhotoUrlthumbnail_photo_urlstringstrNoProfile image URL
OrgUnitPathorg_unit_pathstringstrNoOrganizational-unit path
CreationTimecreation_timeTimestampdatetime | TimestampNoCreation time
SuspendedsuspendedboolboolNoWhether the user is suspended
ArchivedarchivedboolboolNoWhether the user is archived
DeletionTimedeletion_timeTimestampdatetime | TimestampNoDeletion time
IsMailboxSetupis_mailbox_setupboolboolNoWhether the mailbox is set up
OrganizationsorganizationsRepeatedField<GoogleEmployeeOrganization>list[GoogleEmployeeOrganization]NoOrganization entries
AddressesaddressesRepeatedField<GoogleEmployeeAddress>list[GoogleEmployeeAddress]NoAddress entries
RelationsrelationsRepeatedField<GoogleEmployeeRelation>list[GoogleEmployeeRelation]NoEmployee relations

Organization entries expose optional cost center, description, title, primary, and type fields. Address entries expose optional country, primary, and type fields. Relation entries expose optional type and value fields.

OktaEmployeeDetails

PropertyPropertyTypeTypeRequiredDescription
IdidstringstrYesOkta user identifier
StatusstatusstringstrYesOkta lifecycle status
CreatedcreatedTimestampdatetime | TimestampYesCreation time
ProfileprofileOktaEmployeeProfileOktaEmployeeProfileYesUser profile

OktaEmployeeProfile requires Email / email, FirstName / first_name, and LastName / last_name. Department, manager ID, manager, country code, division, cost center, user type, and title are optional strings.

BambooHrEmployeeDetails

PropertyPropertyTypeTypeRequiredDescription
IdidstringstrYesBambooHR employee identifier
FirstNamefirst_namestringstrYesGiven name
LastNamelast_namestringstrYesFamily name
WorkEmailwork_emailstringstrNoWork email
DepartmentdepartmentstringstrNoDepartment
JobTitlejob_titlestringstrNoJob title
DivisiondivisionstringstrNoDivision
CountrycountrystringstrNoCountry
StatusstatusstringstrNoEmployment status
HireDatehire_dateTimestampdatetime | TimestampNoHire date
EmploymentStatusemployment_statusstringstrNoSource employment status
SupervisorIdsupervisor_idstringstrNoSupervisor identifier
SupervisorEmailsupervisor_emailstringstrNoSupervisor email
PhotoUrlphoto_urlstringstrNoProfile image URL
MetaUserStatusmeta_user_statusstringstrNoBambooHR meta-user status
CostCentercost_centerstringstrNoCost center
EmployeeTypeemployee_typestringstrNoEmployee type

Groups and Devices

Groups, memberships, and devices are snapshot-backed records.

Group

PropertyPropertyTypeTypeRequiredDescription
GenericgenericGenericGroupDetailsGenericGroupDetailsExactly oneProvider-neutral group details

GenericGroupDetails

PropertyPropertyTypeTypeRequiredDescription
IdidstringstrYesStable source group identifier
NamenamestringstrYesGroup name
DescriptiondescriptionstringstrNoGroup description
DeletionTimedeletion_timeTimestampdatetime | TimestampNoSource deletion time
CreationTimecreation_timeTimestampdatetime | TimestampNoSource creation time
EmailAliasesemail_aliasesRepeatedField<string>list[str]NoGroup email aliases
AttributesattributesMapField<string, string>dict[str, str]NoSource-specific metadata

GroupMember

PropertyPropertyTypeTypeRequiredDescription
GenericgenericGenericGroupMemberDetailsGenericGroupMemberDetailsExactly oneProvider-neutral membership details

GenericGroupMemberDetails

PropertyPropertyTypeTypeRequiredDescription
GroupIdgroup_idstringstrYesReferenced group identifier
MemberIdmember_idstringstrYesReferenced user or group identifier
TypetypeGroupMemberTypeGroupMemberTypeYesWhether the member is a user or group
DeletionTimedeletion_timeTimestampdatetime | TimestampNoMembership deletion time
CreationTimecreation_timeTimestampdatetime | TimestampNoMembership creation time
RolerolestringstrNoSource membership role
AttributesattributesMapField<string, string>dict[str, str]ConditionalMust include a stable sourceId entry

Device

PropertyPropertyTypeTypeRequiredDescription
GenericgenericGenericDeviceDetailsGenericDeviceDetailsExactly oneProvider-neutral device details

GenericDeviceDetails

PropertyPropertyTypeTypeRequiredDescription
IdidstringstrYesStable source device identifier
NamenamestringstrYesDevice name
SerialNumberserial_numberstringstrYesDevice serial number
OwnerownerDeviceOwnerDeviceOwnerNoDevice owner
UuiduuidstringstrNoDevice UUID

DeviceOwner

PropertyPropertyTypeTypeRequiredDescription
IdidstringstrYesReferenced owner identifier
EmailemailstringstrNoOwner email

GroupMemberType

C#PythonDescription
UnspecifiedGROUP_MEMBER_TYPE_UNSPECIFIEDNo member type selected
UserGROUP_MEMBER_TYPE_USERUser member
GroupGROUP_MEMBER_TYPE_GROUPNested group member

Audit Logs

Audit logs are event-based. Select the details model that matches the source event.

AuditLog

PropertyPropertyTypeTypeRequiredDescription
GenericgenericGenericAuditLogDetailsGenericAuditLogDetailsExactly oneProvider-neutral audit event
MicrosoftSignInmicrosoft_sign_inMicrosoftSignInAuditLogDetailsMicrosoftSignInAuditLogDetailsExactly oneMicrosoft Graph sign-in event
MicrosoftSecuritymicrosoft_securityMicrosoftSecurityAuditLogDetailsMicrosoftSecurityAuditLogDetailsExactly oneMicrosoft Graph security audit event

GenericAuditLogDetails

PropertyPropertyTypeTypeRequiredDescription
DatedateTimestampdatetime | TimestampYesEvent time
AuditLogSourceaudit_log_sourcestringstrYesSource audit-log stream
ActoractorAuditLogActorAuditLogActorYesActor identity
ApplicationNameapplication_namestringstrYesApplication name
SourcesourcestringstrYesEvent source
ActivityNameactivity_namestringstrYesActivity name
EventProviderevent_providerstringstrYesProvider that emitted the event
ScopesscopesstringstrNoEvent scopes

AuditLogActor requires Email / email. Its Id / id field is optional.

MicrosoftSignInAuditLogDetails

PropertyPropertyTypeTypeRequiredDescription
CreatedDateTimecreated_date_timeTimestampdatetime | TimestampYesSign-in time
UserIduser_idstringstrYesMicrosoft user identifier
AppDisplayNameapp_display_namestringstrYesApplication display name
UserPrincipalNameuser_principal_namestringstrNoUser principal name
ClientAppUsedclient_app_usedstringstrNoClient used for sign-in
AppIdapp_idstringstrNoApplication identifier
ResourceDisplayNameresource_display_namestringstrNoResource display name
ResourceIdresource_idstringstrNoResource identifier
IsInteractiveis_interactiveboolboolNoWhether the sign-in was interactive
StatusstatusMicrosoftSignInStatusMicrosoftSignInStatusNoError code and failure details

Omit the complete sign-in record when the source does not provide AppDisplayName / app_display_name. Status error code, failure reason, and additional details are all optional.

MicrosoftSecurityAuditLogDetails

PropertyPropertyTypeTypeRequiredDescription
ActorIdactor_idstringstrYesEntra ID user object ID resolved from the user principal name
CreatedDateTimecreated_date_timeTimestampdatetime | TimestampNoEvent time
UserPrincipalNameuser_principal_namestringstrNoUser principal name
ServiceservicestringstrNoMicrosoft service
OperationoperationstringstrNoAudit operation
AuditLogRecordTypeaudit_log_record_typestringstrNoMicrosoft record type

AI Usage and Cost

AI usage and cost records are event-based. The models preserve provider response fields without normalization.

AiUsage and AiCost

PropertyPropertyTypeTypeRequiredDescription
AiUsage.ProviderAiUsage.providerAiProviderAiProviderYesUsage provider
AiUsage.AnthropicChatUsageAiUsage.anthropic_chat_usageAnthropicChatUsageAnthropicChatUsageExactly oneAnthropic Messages API usage
AiUsage.AnthropicClaudeCodeAiUsage.anthropic_claude_codeAnthropicClaudeCodeUsageAnthropicClaudeCodeUsageExactly oneAnthropic Claude Code usage
AiCost.ProviderAiCost.providerAiProviderAiProviderYesCost provider
AiCost.AnthropicCostAiCost.anthropic_costAnthropicCostAnthropicCostExactly oneAnthropic cost report item

AnthropicChatUsage

PropertyPropertyTypeTypeRequiredDescription
StartingAtstarting_atTimestampdatetime | TimestampYesBucket start, inclusive
EndingAtending_atTimestampdatetime | TimestampYesBucket end, exclusive
UncachedInputTokensuncached_input_tokenslongintYesUncached input tokens
CacheReadInputTokenscache_read_input_tokenslongintYesCache-read input tokens
OutputTokensoutput_tokenslongintYesOutput tokens
CacheCreationcache_creationAnthropicCacheCreationAnthropicCacheCreationYesOne-hour and five-minute cache-creation token counts
ServerToolUseserver_tool_useAnthropicServerToolUseAnthropicServerToolUseYesServer tool-use counts
AccountIdaccount_idstringstrNoAnthropic account identifier
ApiKeyIdapi_key_idstringstrNoAPI key identifier
ServiceAccountIdservice_account_idstringstrNoService-account identifier
WorkspaceIdworkspace_idstringstrNoAnthropic workspace identifier
ModelmodelstringstrNoModel
ServiceTierservice_tierstringstrNoService tier
ContextWindowcontext_windowstringstrNoContext-window group
InferenceGeoinference_geostringstrNoInference geography

AnthropicCacheCreation requires the one-hour and five-minute token counts. AnthropicServerToolUse requires the web-search request count.

AnthropicCost

PropertyPropertyTypeTypeRequiredDescription
StartingAtstarting_atTimestampdatetime | TimestampYesBucket start, inclusive
EndingAtending_atTimestampdatetime | TimestampYesBucket end, exclusive
AmountamountstringstrYesLowest currency units as reported by Anthropic
CurrencycurrencystringstrYesCurrency code
WorkspaceIdworkspace_idstringstrNoAnthropic workspace identifier
DescriptiondescriptionstringstrNoCost description
CostTypecost_typestringstrNoCost category
TokenTypetoken_typestringstrNoToken category
ModelmodelstringstrNoModel
ServiceTierservice_tierstringstrNoService tier
ContextWindowcontext_windowstringstrNoContext-window group
InferenceGeoinference_geostringstrNoInference geography

AnthropicClaudeCodeUsage

PropertyPropertyTypeTypeRequiredDescription
DatedateTimestampdatetime | TimestampYesUTC usage day
ActoractorAnthropicClaudeCodeActorAnthropicClaudeCodeActorYesUser or API actor
CoreMetricscore_metricsAnthropicClaudeCodeCoreMetricsAnthropicClaudeCodeCoreMetricsYesSession, code-line, commit, and pull-request metrics
ToolActionstool_actionsAnthropicClaudeCodeToolActionsAnthropicClaudeCodeToolActionsYesAccepted and rejected tool actions
OrganizationIdorganization_idstringstrNoAnthropic organization identifier
CustomerTypecustomer_typestringstrNoAPI or subscription customer type
SubscriptionTypesubscription_typestringstrNoSubscription type
TerminalTypeterminal_typestringstrNoTerminal or editor
ModelBreakdownsmodel_breakdownsRepeatedField<AnthropicClaudeCodeModelBreakdown>list[AnthropicClaudeCodeModelBreakdown]NoPer-model tokens and estimated cost

The nested Claude Code metrics use required numeric counters. The actor type is required; actor email and API-key name are optional. Each model breakdown requires its model, token counts, and estimated currency and amount.

AiProvider

C#PythonDescription
UnspecifiedAI_PROVIDER_UNSPECIFIEDNo provider selected
AnthropicAI_PROVIDER_ANTHROPICAnthropic provider data
GenericAI_PROVIDER_GENERICProvider-neutral data