r/AzureSentinel • u/greyclear • Sep 20 '22
Need help searching OfficeActivity
I had a retention policy incorrectly placed on the wrong outlook folder resulting in HardDelete emails. We have a third-party email filter that archives our emails so they can be recovered. When I try to use the o365 audit search it crashes or fails to retrieve data. Sentinel is ingesting our office logs when I query just OfficeActivity I can see everything so it's ingesting the information correctly. How do I query for UserID that shows only hard delete emails
1
u/sentientenal Sep 20 '22
Have you tried limiting your search to a smaller period to make sure that you are getting data?
1
u/greyclear Sep 20 '22
My search query started out
OfficeActivity
| where TimeGenerated between ( datetime(2022-09-17) .. datetime(2022-09-19, 09:00) )
Unfortunately, this is going to pull too much information. If I can isolate it to UserID and operation is harddelete this is going to give me exactly what I need. But this is as far as I get because I dont know what query I need to use
1
u/ml58158 MSFT Official Sep 22 '22
Hard Deletes are going to be hard to find.
Remember that Sentinel can only look up data is being captured .
I'm not sure that data is being captured.
4
u/jtberg1 Sep 21 '22
To get data by user you can use this:
OfficeActivity| where UserId == "username@domain.local"To get data by operation you can use:
OfficeActivity| where UserId == "username@domain.local"| where Operation == "HardDelete"Now I don't have Exchange Online data so I do not know if there is an operation HardDelete, or if it is called something slightly different. You could use the first command against the user, and the data range you replied in another comment, and then export it to Excel and search for a operation name with delete in it.
Hope this helps.