Try in Splunk Security Cloud


The following analytic identifies the assignment of the ApplicationImpersonation role in Office 365, either to a user or an application. This analytic leverages the Office 365 Management Activity API, specifically monitoring for events related to role assignments and changes within the Azure Active Directory audit logs. The ApplicationImpersonation role allows a security principal to impersonate any user within the organization and perform actions on their behalf, such as accessing or modifying their mailbox. This role, if misused or granted inappropriately, can pose a significant security risk. Monitoring the assignment of this role is crucial as it can be an indicator of potential malicious activity or misconfigurations. If an attacker successfully assigns the ApplicationImpersonation role to a malicious user or application, they can gain the ability to impersonate any user within the organization. This can lead to unauthorized access to sensitive information, manipulation of mailbox data, and other malicious actions. The attacker can effectively masquerade as a legitimate user, making their actions harder to detect and potentially causing significant harm to the organization.

  • Type: TTP
  • Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud

  • Last Updated: 2023-10-17
  • Author: Mauricio Velazco, Splunk
  • ID: 49cdce75-f814-4d56-a7a4-c64ec3a481f2




ID Technique Tactic
T1098 Account Manipulation Persistence, Privilege Escalation
T1098.002 Additional Email Delegate Permissions Persistence, Privilege Escalation
Kill Chain Phase
  • Installation
  • Exploitation
  • DE.CM
  • CIS 10
`o365_management_activity` Workload=Exchange Operation="New-ManagementRoleAssignment"  Role=ApplicationImpersonation 
|  rename User as target_user 
| stats  max(_time) as lastTime by Operation, user, object, ObjectId, Role, target_user 
| `security_content_ctime(lastTime)` 
| `o365_applicationimpersonation_role_assigned_filter`


The SPL above uses the following Macros:

:information_source: o365_applicationimpersonation_role_assigned_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Required fields

List of fields required to use this analytic.

  • _time
  • Workload
  • Operation
  • Role
  • user
  • User
  • object
  • ObjectId

How To Implement

You must install the Splunk Microsoft Office 365 Add-on and ingest Office 365 management activity events.

Known False Positives

While infrequent, the ApplicationImpersonation role may be granted for leigimate reasons, filter as needed.

Associated Analytic Story


Risk Score Impact Confidence Message
56.0 80 70 $user$ granted the ApplicationImpersonation role to $target_user$

:information_source: The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.


Test Dataset

Replay any dataset to Splunk Enterprise by using our tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range

source | version: 1