Skip to main content

M365

Constant M365 

Source
pub const M365: &str = "# The Microsoft 365 unified audit log, as the Office 365 Management Activity\n# API delivers it: a content blob is an array of records, `[...]`, which the\n# definition unwraps; tools that page through the API and write one record\n# per line are read the same way.\n#\n# Records of every workload share the API\'s common schema: `Operation`,\n# `Workload`, `UserId`, `ResultStatus`, and the rest. Entra ID sign-ins become\n# OCSF Authentication; account, password, and strong authentication changes,\n# Account Change; group membership, Group Management; and directory roles,\n# User Access Management. Every other operation of every workload, such as\n# Exchange cmdlets, mailbox and SharePoint activity, and the alerts of the\n# Security & Compliance Center, becomes an API Activity whose operation is\n# the record\'s, so that none is lost for having no kind of its own. Every\n# member of a record not mapped below is kept under `unmapped` by its own\n# name, such as an Exchange cmdlet\'s `Parameters`, whole.\n#\n# Microsoft writes `CreationTime` without an offset; it is UTC. The client\n# address is mapped only on sign-ins, where Entra ID writes an address alone;\n# Exchange writes it with a port, and keeps it under `unmapped`.\n\nname: m365\nversion: 1\nframing: json-values\ndecoding: json\nunwrap: \".\"\n\n# The ATT&CK data components its records supply: those ATT&CK names for\n# m365:unified, of the records the kinds below read.\ndata_components:\n  - Active Directory Object Modification\n  - Application Log Content\n  - Cloud Service Enumeration\n  - Cloud Service Metadata\n  - Cloud Service Modification\n  - Cloud Storage Access\n  - Cloud Storage Metadata\n  - Cloud Storage Modification\n  - Command Execution\n  - File Access\n  - Group Modification\n  - Logon Session Creation\n  - Logon Session Metadata\n  - Module Load\n  - Network Share Access\n  - Script Execution\n  - User Account Authentication\n  - User Account Creation\n  - User Account Deletion\n  - User Account Metadata\n  - User Account Modification\n  - Web Credential Creation\n  - Web Credential Usage\n  - Windows Registry Key Modification\n\ncommon:\n  time: { from: CreationTime, as: utc-timestamp }\n  metadata.version: { value: \"1.5.0\" }\n  metadata.product.name: { value: Microsoft 365 }\n  metadata.product.vendor_name: { value: Microsoft }\n  metadata.product.feature.name: Workload\n  metadata.uid: Id\n  metadata.event_code: Operation\n  metadata.tenant_uid: OrganizationId\n  # Most workloads write Succeeded or Failed, Entra ID Success, and Exchange\n  # cmdlets True or False; the value as written is the status code.\n  status_code: ResultStatus\n  status:\n    from: ResultStatus\n    map: { Succeeded: Success, Success: Success, \"True\": Success, \"true\": Success, Failed: Failure, \"False\": Failure, \"false\": Failure }\n    otherwise: Other\n  status_id:\n    from: ResultStatus\n    map: { Succeeded: 1, Success: 1, \"True\": 1, \"true\": 1, Failed: 2, \"False\": 2, \"false\": 2 }\n    otherwise: 99\n  actor.user.name: UserId\n  actor.user.type_id:\n    # Regular, Admin, and datacenter admin; system, and system policy.\n    from: UserType\n    map: { \"0\": 1, \"2\": 2, \"3\": 2, \"4\": 3, \"8\": 3 }\n    otherwise: 99\n\nkinds:\n  - name: sign_in\n    when:\n      Operation: UserLoggedIn\n    # Authentication: Logon, to the resource in `ObjectId`.\n    class: { class_uid: 3002, activity_id: 1 }\n    fields: &sign_in\n      severity_id: { value: 1 }\n      user.name: UserId\n      user.uid: UserKey\n      src_endpoint.ip: { from: ClientIP, as: ip }\n      service.uid: ObjectId\n      actor.app_uid: ApplicationId\n      status_detail: LogonError\n    unmapped: [\".\"]\n\n  - name: sign_in_failed\n    when:\n      Operation: UserLoginFailed\n    # Authentication: Logon, failed; `ErrorNumber` is Entra ID\'s error code.\n    class: { class_uid: 3002, activity_id: 1 }\n    fields: *sign_in\n    unmapped: [\".\"]\n\n  - name: account_created\n    when:\n      Operation: Add user.\n    # Account Change: Create, of the user in `ObjectId`.\n    class: { class_uid: 3001, activity_id: 1 }\n    fields: &target_user\n      severity_id: { value: 1 }\n      user.name: ObjectId\n    unmapped: [\".\"]\n\n  - name: password_changed\n    when:\n      Operation: Change user password.\n    # Account Change: Password Change.\n    class: { class_uid: 3001, activity_id: 3 }\n    fields: *target_user\n    unmapped: [\".\"]\n\n  - name: password_reset\n    when:\n      Operation: Reset user password.\n    # Account Change: Password Reset.\n    class: { class_uid: 3001, activity_id: 4 }\n    fields: *target_user\n    unmapped: [\".\"]\n\n  - name: strong_authentication_disabled\n    when:\n      Operation: Disable Strong Authentication.\n    # Account Change: MFA Factor Disable.\n    class: { class_uid: 3001, activity_id: 11 }\n    fields: *target_user\n    unmapped: [\".\"]\n\n  - name: account_deleted\n    when:\n      Operation: Delete user.\n    # Account Change: Delete.\n    class: { class_uid: 3001, activity_id: 6 }\n    fields: *target_user\n    unmapped: [\".\"]\n\n  - name: group_member_added\n    when:\n      Operation: Add member to group.\n    # Group Management: Add User. The group is among `ModifiedProperties`,\n    # in no fixed place, and kept there.\n    class: { class_uid: 3006, activity_id: 3 }\n    fields: *target_user\n    unmapped: [\".\"]\n\n  - name: group_member_removed\n    when:\n      Operation: Remove member from group.\n    # Group Management: Remove User.\n    class: { class_uid: 3006, activity_id: 4 }\n    fields: *target_user\n    unmapped: [\".\"]\n\n  - name: role_member_added\n    when:\n      Operation: Add member to role.\n    # User Access Management: Assign Privileges; the role is among\n    # `ModifiedProperties`.\n    class: { class_uid: 3005, activity_id: 1 }\n    fields: *target_user\n    unmapped: [\".\"]\n\n  - name: role_member_removed\n    when:\n      Operation: Remove member from role.\n    # User Access Management: Revoke Privileges.\n    class: { class_uid: 3005, activity_id: 2 }\n    fields: *target_user\n    unmapped: [\".\"]\n\n  - name: alert\n    when:\n      Operation: AlertTriggered\n    # API Activity: Other. An alert of the Security & Compliance Center, or\n    # of Defender for Cloud Apps through it, as the audit log records it: its\n    # name is the message, its severity the event\'s.\n    class: { class_uid: 6003, activity_id: 99 }\n    fields:\n      api.operation: Operation\n      message: Name\n      severity: Severity\n      severity_id:\n        from: Severity\n        map: { Informational: 1, Low: 2, Medium: 3, High: 4 }\n        otherwise: 99\n    unmapped: [\".\"]\n\n  - name: other\n    when:\n      # Every record of the API\'s common schema is of version 1, so this\n      # kind takes each record of an operation no kind above names.\n      Version: 1\n    # API Activity: Other, the operation being the record\'s.\n    class: { class_uid: 6003, activity_id: 99 }\n    fields:\n      api.operation: Operation\n      severity_id: { value: 1 }\n    unmapped: [\".\"]\n";
Expand description

The Microsoft 365 unified audit log definition shipped with this crate: Entra ID sign-ins, accounts, groups, roles, and every other operation of every workload.