1. Resources
  2. Detection sources
  3. GrantPermissionsAsync

GrantPermissionsAsync: A user or group was assigned to a Microsoft Purview role group

Recorded when an admin adds a user, a security group or an application to a role group in the Microsoft Purview or Microsoft Defender portal. Added to eDiscovery Manager, the member can search and export content tenant-wide.

Log source
Microsoft 365 unified audit log (Microsoft Purview)
Detection value
Supporting
Volume
Low (estimate)
Last updated
Log
Microsoft 365 unified audit log (Microsoft Purview) (Microsoft 365 unified audit log (Microsoft Purview), on by default)
Service
Microsoft 365 unified audit log (Microsoft Purview)
Operation
GrantPermissionsAsync
Detects
1 attack (1 rule · 1 detection logic)
MITRE ATT&CK
2 techniques in 3 tactics
Threat groups
5 groups that MITRE ATT&CK records using these techniques
Fields the rules read
Operation

When it is written

Microsoft Purview writes GrantPermissionsAsync (record type 87, SecurityComplianceRBAC) when user assignments are added to a role group. The Security and Compliance RBAC schema covers role group management in the Microsoft Purview portal and the Microsoft Defender portal. Managing role groups takes the Role Management role, which only the Organization Management role group holds by default, or the Global Administrator role.

PreExecutionMessage holds the input: the member (MemberDetail), the role group (RoleGroupDetail), the scope (ScopeDetail, null for an organization-wide assignment, otherwise for example a case) and the expiry (ExpiresAt, Permanent or a UTC timestamp). PostExecutionMessage holds the assignment that resulted, and is empty when the operation failed before returning. Microsoft types both as strings that carry these properties, so a SIEM may have to parse the text before it can read the paths; the sample shows them as objects.

An assignment that expires is removed without a new audit record. Microsoft does not say that a change in the membership of a security group that holds the role group is written here (look for it in the Microsoft Entra ID audit log), nor whether members added with Add-RoleGroupMember in Security & Compliance PowerShell, which Microsoft documents for eDiscovery Manager, produce this record.

How to turn it on

Microsoft 365 unified audit log (Microsoft Purview) records GrantPermissionsAsync calls to Microsoft 365 unified audit log (Microsoft Purview) without any setup. Vendor documentation

eDiscovery activities and Microsoft Purview role group changes are recorded in the Microsoft 365 unified audit log by Microsoft Purview Audit (Standard), which is on by default for most organizations. Microsoft names two exceptions where auditing must be turned on by hand: tenants with Business Basic, Business Standard or Business Premium licences, and unmanaged tenants on enterprise trials. Check UnifiedAuditLogIngestionEnabled in Exchange Online PowerShell (in Security & Compliance PowerShell the property always reads False).

  • What is recorded: eDiscovery activities performed in the Microsoft Purview portal or in PowerShell (cases, searches, holds, review sets, exports), and the creation, change and deletion of Microsoft Purview role groups and their user assignments. eDiscovery done with cmdlets is returned by a separate activity group, eDiscovery cmdlet activities, which reads the cmdlet audit log; Microsoft does not say whether those records use the operation names of this source.
  • Retention: 180 days with Audit (Standard). The one-year default policy of Audit (Premium) covers only Microsoft Entra ID, Exchange, OneDrive and SharePoint records, so these records stay 180 days unless a custom audit log retention policy keeps them longer.
  • Collection: the Office 365 Management Activity API publishes these records in the Audit.General content type (every workload outside Microsoft Entra ID, Exchange and SharePoint). A subscription has to be started first (the first content can take up to 12 hours), content can be listed at most 7 days back, and records do not arrive in order. Microsoft describes the OfficeActivity table of Microsoft Sentinel's Microsoft 365 connector as Exchange, SharePoint and Teams logs: the Purview records are not in it, so collect them through the Management Activity API.
  • Delay: Microsoft guarantees no delivery time: 60 to 90 minutes is typical for the core services, and Microsoft notes that records of other services can take longer.
  • Turning auditing off (Set-AdminAuditLogConfig -UnifiedAuditLogIngestionEnabled $false) also stops the Management Activity API; the change is itself recorded as a Set-AdminAuditLogConfig record in the Exchange admin records.
Check that the unified audit log is on (read only, Exchange Online PowerShell)
Get-AdminAuditLogConfig | Format-List UnifiedAuditLogIngestionEnabled
Based on vendor documentation.
List custom audit log retention policies (read only, Security & Compliance PowerShell; the default policy is not shown)
Get-UnifiedAuditLogRetentionPolicy | Sort-Object -Property Priority -Descending | Format-List Priority,Name,RecordTypes,Operations,UserIds,RetentionDuration
Based on vendor documentation.
List the Management Activity API subscriptions of the tenant (read only; Audit.General must be enabled)
Invoke-RestMethod -Method Get -Uri "https://manage.office.com/api/v1.0/<tenant-id>/activity/feed/subscriptions/list" -Headers @{ Authorization = "Bearer <access-token>" }
Based on vendor documentation.
Find recent GrantPermissionsAsync records (read only)
Search-UnifiedAuditLog -StartDate (Get-Date).AddDays(-7) -EndDate (Get-Date) -Operations GrantPermissionsAsync -ResultSize 5 | Select-Object -ExpandProperty AuditData
Based on vendor documentation.

Fields

The operation’s own fields first, then the fields every Microsoft 365 unified audit log (Microsoft Purview) record has. Field names are the JSON paths of the record as the vendor documents it.

FieldWhat it holds
PreExecutionMessage.MemberDetail.MemberNameName of the member that was assigned.
PreExecutionMessage.MemberDetail.MemberTypeKind of member (User, SecurityGroup, ServicePrincipal, Application).
PreExecutionMessage.MemberDetail.MemberIdIdentifier (GUID) of the member.
PreExecutionMessage.RoleGroupDetail.RoleGroupNameName of the role group the member was assigned to.
PreExecutionMessage.ScopeDetailScope of the assignment (ScopeId, ScopeType such as Case, ScopeFeature, ScopePathById); null for the whole organization.
PreExecutionMessage.ExpiresAtWhen the assignment expires, Permanent or an ISO 8601 UTC timestamp.
PostExecutionMessageThe resulting assignment (MemberDetail, RoleGroupDetail, ScopeDetail, ExpiresAt); empty when the operation failed before returning a result.
Fields every Microsoft 365 unified audit log (Microsoft Purview) record has (12)
FieldWhat it holds
CreationTimeWhen the record was generated, in UTC.
IdUnique identifier of the audit record.
OperationRead by 1 ruleThe activity (CaseAdded, GrantPermissionsAsync...). The operation this page is about.
RecordTypeThe kind of record (24 Discovery for eDiscovery activities in the Microsoft Purview portal, 87 SecurityComplianceRBAC for role group management).
WorkloadThe service where the activity occurred. Microsoft does not document the value for eDiscovery and role group records; read it in your own records before filtering on it.
OrganizationIdGUID of the Microsoft 365 tenant, the same in every service.
UserIdUPN of the user who performed the activity.
UserKeyAn alternative ID for the user in UserId; for eDiscovery activities usually the same value.
UserTypeWho performed the activity (0 Regular, 2 Admin, 3 DCAdmin, 4 System, 5 Application, 6 ServicePrincipal...).
ClientIPAddress of the device used for the activity. Microsoft includes it for every activity of the current eDiscovery experience; a record without it comes from the classic experience.
ResultStatusWhether the activity succeeded. Role group records write Success or Failed. Microsoft lists no values for eDiscovery records (its common schema names Succeeded, PartiallySucceeded and Failed), so read the value in your own records before filtering on it.
VersionVersion number of the record format for this activity.

Values to know

PreExecutionMessage.RoleGroupDetail.RoleGroupName

ValueMeaningSignal
eDiscovery Manager, or another role group with the Export, Preview or Compliance Search roleThe member can search, preview or export content across the tenantWhat the rule exists for. Confirm the request with the legal or compliance team; otherwise remove the assignment and read what the member did since.Attack signal

PreExecutionMessage.MemberDetail.MemberType

ValueMeaningSignal
ServicePrincipal or ApplicationAn application was given the role groupMicrosoft documents a service principal in the eDiscovery Manager role group for app-only eDiscovery; confirm that the application is one the organization runs.Worth knowing
SecurityGroupA group holds the role groupEveryone added to the group later gets the role group; review the group's membership in Microsoft Entra ID.Worth knowing

PreExecutionMessage.ExpiresAt

ValueMeaningSignal
PermanentThe assignment does not expireWorth knowing
an ISO 8601 timestampTemporary access, removed automatically on that dateExpected

ResultStatus

ValueMeaningSignal
FailedThe assignment was not madeSeveral failures from one account mean someone is testing what it can do.Failure

Volume and noise

Low. Compliance and security teams add members when people join or start a case, and app-only eDiscovery automation adds a service principal once. An assignment to eDiscovery Manager or another role group that holds the Export, Preview or Compliance Search role, made for an account outside the legal and compliance teams, permanent, or by an account that does not usually manage role groups, is the record to read first.

Keeping it manageable

  • Read PreExecutionMessage.RoleGroupDetail.RoleGroupName first; assignments to role groups that can search, preview or export content need a ticket.
  • Compare the member in PreExecutionMessage.MemberDetail with the admin in UserId. An admin who adds itself needs a reason.
  • Prefer expiring assignments: a Permanent value in PreExecutionMessage.ExpiresAt for an eDiscovery role group is worth a question.
  • Follow the member: CaseAdded, PurviewSearchAdded and an export by the same account within days is the chain the eDiscovery attack page describes.

Sample event

A Microsoft 365 unified audit log (Microsoft Purview) record in the vendor’s format, with made-up values.

{
  "CreationTime": "2026-11-18T09:30:12",
  "Id": "6f1c2d3e-4a5b-4c6d-8e9f-0a1b2c3d4e5f",
  "Operation": "GrantPermissionsAsync",
  "OrganizationId": "00000000-0000-0000-0000-00000000c0de",
  "RecordType": 87,
  "UserKey": "compliance-admin@corp.example.com",
  "UserType": 2,
  "Version": 1,
  "ClientIP": "203.0.113.24",
  "UserId": "compliance-admin@corp.example.com",
  "ResultStatus": "Success",
  "PreExecutionMessage": {
    "MemberDetail": {
      "MemberId": "00000000-0000-0000-0000-00000000a11e",
      "MemberType": "User",
      "MemberName": "legal.analyst@corp.example.com",
      "MemberDisplayName": "Legal Analyst"
    },
    "RoleGroupDetail": {
      "RoleGroupId": "00000000-0000-0000-0000-0000000e0d15",
      "RoleGroupName": "eDiscoveryManager"
    },
    "ScopeDetail": null,
    "ExceptionMessage": null,
    "ExpiresAt": "Permanent"
  },
  "PostExecutionMessage": {
    "MemberDetail": {
      "MemberId": "00000000-0000-0000-0000-00000000a11e",
      "MemberType": "User",
      "MemberName": "legal.analyst@corp.example.com"
    },
    "RoleGroupDetail": {
      "RoleGroupId": "00000000-0000-0000-0000-0000000e0d15",
      "RoleGroupName": "eDiscoveryManager"
    },
    "ScopeDetail": null,
    "ExpiresAt": "Permanent"
  }
}

Attacks this event reveals

Detection rules that read this event:

Frequently asked questions

Is an assignment that expires recorded?

No. Microsoft records the expiry date when an admin sets or changes it, and writes no record when the assignment ends.

Why can't my SIEM read PreExecutionMessage.MemberDetail.MemberName?

Microsoft types PreExecutionMessage as a string. If your SIEM keeps it as text, parse it as JSON before reading the paths on this page.

References