A cloud-based service included in Microsoft 365, delivering scalable messaging and collaboration features with simplified management and automatic updates.
Hi @RisingFlight,
Thank you very much for your response and update.
To assist you better, may I verify whether you have enabled SearchQueryInitiated in the mailbox’s AuditOwner actions for the user you want to track?
For example, if you want to check SearchQueryInitiatedSharePoint and SearchQueryInitiatedExchange audit logs for user1, you first need to enable SearchQueryInitiated on that user’s mailbox.
Set-Mailbox <user1@domain> -AuditOwner @{Add="SearchQueryInitiated"}
If you want to check which mailboxes have SearchQueryInitiated enabled, you can run this command below:
Get-Mailbox -ResultSize Unlimited |
Select DisplayName,UserPrincipalName,AuditOwner |
Where-Object { $_.AuditOwner -contains 'SearchQueryInitiated' }
This will display all mailboxes where SearchQueryInitiated is enabled.
After that, the user you are tracking must perform a search in Outlook (web or desktop) and on their SharePoint site.
Then in Purview, you can enter the operation name as I suggested previously, or use the event names SearchQueryInitiatedExchange and SearchQueryInitiatedSharePoint in the Operation Name field. I tested this approach, and it works successfully on my end. Additionally, you can specify users in the Users field to narrow the search and reduce processing time.
If you prefer to use PowerShell as an alternative method, you can run the command below. It functions similarly to a Purview audit search and uses a 7-day time range:
Search-UnifiedAuditLog -StartDate (Get-Date).AddDays(-7) -EndDate (Get-Date) -Operations SearchQueryInitiatedSharePoint,SearchQueryInitiatedExchange -UserIds <user1@domain>
This will return the relevant audit events, based on my testing:
I hope this helps. Feel free to give it a try and let me know if it works on your end. I’ll be happy to assist you further.
Warm thanks.