Home

SharePointFileOperation via devices with previously unseen user agents

%3CLINGO-SUB%20id%3D%22lingo-sub-978130%22%20slang%3D%22en-US%22%3ESharePointFileOperation%20via%20devices%20with%20previously%20unseen%20user%20agents%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-978130%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Experts%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20configured%20''SharePointFileOperation%20via%20devices%20with%20previously%20unseen%20user%20agents''%20in%20Azure%20sentinel%2C%20I%20receive%20a%20lots%20of%20alerts%20everyday%20because%20I%20have%20user%20called%20''backup''%20using%20for%20office%20365%20backup.%20I%20must%20exclude%20this%20user%20''backup''%20as%20an%20exception%20of%20the%20alert.%20How%20to%20do%20this%20exception%20inside%20the%20below%20alert%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20the%20below%20alert%2C%26nbsp%3B%20I%20want%20to%20exclude%20the%20user%20Id%20''backup''%20from%20the%20alert.%20please%20support%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Elet%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3Bthreshold%26nbsp%3B%3D%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E10%3C%2FSPAN%3E%3CSPAN%3E%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Elet%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3BszSharePointFileOperati%3C%2FSPAN%3E%3CSPAN%3Eon%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3D%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22SharePointFileOperation%22%3C%2FSPAN%3E%3CSPAN%3E%3B%3C%2FS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26nbsp%3B%26nbsp%3B%3CSPAN%3E%7C%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Eproject%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3BRecordType%26nbsp%3B%3D%26nbsp%3BszSharePointFileOperati%3C%2FSPAN%3E%3CSPAN%3Eon%3C%2FSPAN%3E%3CSPAN%3E%2C%26nbsp%3BUserAgent%2C%26nbsp%3BrecentCount%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%26nbsp%3B%3CSPAN%3E%7C%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Eorder%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Eby%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3BrecentCount%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Easc%3C%2FSPAN%3E%3CSPAN%3E%2C%26nbsp%3BUserAgent%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%2F%2F%26nbsp%3BMore%26nbsp%3Bthan%26nbsp%3B10%26nbsp%3Bdownloads%2Fuploads%26nbsp%3Bfrom%26nbsp%3Ba%26nbsp%3Bnew%26nbsp%3Buser%26nbsp%3Bagent%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%26nbsp%3B%3CSPAN%3E%7C%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Ewhere%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3BrecentCount%26nbsp%3B%26gt%3B%26nbsp%3Bthreshold%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%26nbsp%3B%3CSPAN%3E%7C%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Ejoin%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Ekind%3C%2FSPAN%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3CSPAN%3Eon%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3BUserAgent%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%26nbsp%3B%3CSPAN%3E%7C%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Esummarize%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3BStartTimeUtc%26nbsp%3B%3D%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Emin%3C%2FSPAN%3E%3CSPAN%3E(TimeGenerated)%2C%26nbsp%3BEndTimeUtc%26nbsp%3B%3D%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Emax%3C%2FSPAN%3E%3CSPAN%3E(TimeGenerated)%2C%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Ecount%3C%2FSPAN%3E%3CSPAN%3E()%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Eby%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3BRecordType%2C%26nbsp%3BOperati%3C%2FSPAN%3E%3CSPAN%3Eon%3C%2FSPAN%3E%3CSPAN%3E%2C%26nbsp%3BUserAgent%2C%26nbsp%3BUserType%2C%26nbsp%3BUserId%2C%26nbsp%3BClientIP%2C%26nbsp%3BOfficeWorkload%2C%26nbsp%3BSite_Url%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%26nbsp%3B%3CSPAN%3E%7C%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Eextend%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3Btimestamp%26nbsp%3B%3D%26nbsp%3BStartTimeUtc%2C%26nbsp%3BAccountCustomEntity%26nbsp%3B%3D%26nbsp%3BUserId%2C%26nbsp%3BIPCustomEntity%26nbsp%3B%3D%26nbsp%3BClientIP%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%26nbsp%3B%3CSPAN%3E%7C%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Eorder%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Eby%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3BUserAgent%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Easc%3C%2FSPAN%3E%3CSPAN%3E%2C%26nbsp%3BOperati%3C%2FSPAN%3E%3CSPAN%3Eon%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Easc%3C%2FSPAN%3E%3CSPAN%3E%2C%26nbsp%3BUserId%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Easc%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-981794%22%20slang%3D%22en-US%22%3ERe%3A%20SharePointFileOperation%20via%20devices%20with%20previously%20unseen%20user%20agents%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-981794%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F313521%22%20target%3D%22_blank%22%3E%40Jafar1970%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHave%20you%20tried%20a%20line%20like%20this%20before%20the%20final%20summarize%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%20%20%7C%20where%20UserId%20!%3D%22Backup%22%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-982715%22%20slang%3D%22en-US%22%3ERe%3A%20SharePointFileOperation%20via%20devices%20with%20previously%20unseen%20user%20agents%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-982715%22%20slang%3D%22en-US%22%3E%40Clive%20Waston%3CBR%20%2F%3E%3CBR%20%2F%3EIt%20did%20not%20work%20before%20the%20final%20summarize%2C%20Is%20there%20another%20option%3F%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-982735%22%20slang%3D%22en-US%22%3ERe%3A%20SharePointFileOperation%20via%20devices%20with%20previously%20unseen%20user%20agents%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-982735%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F313521%22%20target%3D%22_blank%22%3E%40Jafar1970%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhat%20is%20in%20the%20USerID%20column%20(I%20assume%20that%20the%20user%20backup%20shows%20in%20there%3F)%2C%20can%20you%20paste%20the%20output%20here%3F%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20think%20I%20used%20an%20uppercase%20B%2C%20can%20you%20try%20a%20lowercase%3F%26nbsp%3B%20Does%20the%20USerId%20startwith%20%22backup%22%2C%20in%20that%20case%20you%20%3CEM%3Estartswith%3C%2FEM%3E%20e.g.%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EOfficeActivity%0A%7C%20where%20UserId%20startswith%20%22backup%22%20%0A%7C%20summarize%20by%20UserId%0A%0AOfficeActivity%0A%7C%20summarize%20count()%20by%20UserId%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-982778%22%20slang%3D%22en-US%22%3ERe%3A%20SharePointFileOperation%20via%20devices%20with%20previously%20unseen%20user%20agents%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-982778%22%20slang%3D%22en-US%22%3EThe%20query%20result%20is%3A%3CBR%20%2F%3ERecord%20type%3A%20SharePointFileOperation%2C%20UserAgent%3A%20Microsoft%20Office%20Word%2F16.0%20(OMDroid%209%3B%20Microsoft%20Office%20Word%2016.0%3B%20Pro)%2C%20recentCount%3A%201%3CBR%20%2F%3E%3CBR%20%2F%3EBy%20using%20the%20investigation%20on%20Azure%20Sentinel%20I%20found%20the%20account%20is%20''backup''%20%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-982853%22%20slang%3D%22en-US%22%3ERe%3A%20SharePointFileOperation%20via%20devices%20with%20previously%20unseen%20user%20agents%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-982853%22%20slang%3D%22en-US%22%3EI%20think%20something%20went%20wrong%20in%20the%20script%2C%20after%20the%20alert%20was%20raised%20I%20check%20the%20output%20and%20found%20out%20that%20the%20condition%20%7C%20where%20recentCount%20%26gt%3B%20threshold%20was%20not%20verified%20so%20why%20the%20alert%20was%20sent%20%3F%20I%20am%20very%20confused%2C%20because%20in%20the%20alert%20i%20could%20not%20find%20anything%20referring%20to%20user%20Id%20backup%2C%20but%20in%20the%20investigation%20I%20found%20the%20user%20that%20causes%20the%20alert%20is%20''backup''.%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20you%20have%20a%20time%20I%20can%20open%20remote%20session%20with%20you%20to%20show%20you%20the%20details%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-982855%22%20slang%3D%22en-US%22%3ERe%3A%20SharePointFileOperation%20via%20devices%20with%20previously%20unseen%20user%20agents%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-982855%22%20slang%3D%22en-US%22%3E%3CP%3EI%20think%20something%20went%20wrong%20in%20the%20script%2C%20after%20the%20alert%20was%20raised%20I%20check%20the%20output%20and%20found%20out%20that%20the%20condition%2F%20%7C%20where%20recentCount%20%26gt%3B%20threshold%20%2Fwas%20not%20verified%20so%20why%20the%20alert%20was%20sent%20%3F%20I%20am%20very%20confused%2C%20because%20in%20the%20alert%20I%20could%20not%20find%20anything%20referring%20to%20user%20Id%20''backup''%2C%20but%20in%20the%20investigation%20I%20found%20the%20user%20that%20causes%20the%20alert%20is%20''backup''.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-983232%22%20slang%3D%22en-US%22%3ERe%3A%20SharePointFileOperation%20via%20devices%20with%20previously%20unseen%20user%20agents%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-983232%22%20slang%3D%22en-US%22%3EYes%2C%20it%20starts%20with%20''backup''%20(lowercase).%20so%20where%20exactly%20I%20must%20write%20%7C%20where%20UserId%20!%3D%22Backup%22%20in%20the%20script%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-985116%22%20slang%3D%22en-US%22%3ERe%3A%20SharePointFileOperation%20via%20devices%20with%20previously%20unseen%20user%20agents%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-985116%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F313521%22%20target%3D%22_blank%22%3E%40Jafar1970%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20early%20as%20you%20can%2C%20maybe%20after%3A%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%20OfficeActivity%0A%20%20%7C%20where%20TimeGenerated%20between(ago(14d)..ago(1d))%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDoes%20it%20start%20with%20%22backup%22%20or%20that%20it%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EOfficeActivity%0A%7C%20where%20UserId%20!startswith%20%22backup%22%0A%7C%20summarize%20count()%20by%20UserId%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-985774%22%20slang%3D%22en-US%22%3ERe%3A%20SharePointFileOperation%20via%20devices%20with%20previously%20unseen%20user%20agents%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-985774%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F155109iCB725893333E1115%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_2.png%22%20title%3D%22clipboard_image_2.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3ETo%20avoid%20the%20confusion%20of%20where%20to%20write%20that%20line--%26nbsp%3B%20Simply-%20Run%20the%20original%20query%20then%20drill%20into%26nbsp%3B%20one%20of%20the%20results%20you%20want%20to%20exclude%20which%20is%20%22backup%22%20in%20your%20case.%20So%20if%20you%20have%20service%20account%20for%20it%2C%20simply%20click%20on%203%20dots%20shown%20before%20UserID%20and%20select%20Exclude.%26nbsp%3B%20This%20will%20append%20your%20query%20and%20use%20it.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Jafar1970
Occasional Contributor

Hi Experts

 

I have configured ''SharePointFileOperation via devices with previously unseen user agents'' in Azure sentinel, I receive a lots of alerts everyday because I have user called ''backup'' using for office 365 backup. I must exclude this user ''backup'' as an exception of the alert. How to do this exception inside the below alert ?

 

I have the below alert,  I want to exclude the user Id ''backup'' from the alert. please support

 

 let threshold = 10;
  let szSharePointFileOperation = "SharePointFileOperation";
  let szOperations = dynamic(["FileDownloaded""FileUploaded"]);
  let historicalActivity =
  OfficeActivity
  | where TimeGenerated between(ago(14d)..ago(1d))
  | where RecordType =~ szSharePointFileOperation
  | where Operation in~ (szOperations)
  | summarize historicalCount = count() by UserAgent;
  let recentActivity = OfficeActivity
  | where RecordType =~ szSharePointFileOperation
  | where Operation in~ (szOperations)
  | where TimeGenerated > ago(1d)
  | summarize recentCount = count() by UserAgent;
  recentActivity | join kind = leftanti (historicalActivity) on UserAgent
  | project RecordType = szSharePointFileOperation, UserAgent, recentCount
  | order by recentCount asc, UserAgent
  // More than 10 downloads/uploads from a new user agent
  | where recentCount > threshold
  | join kind = rightsemi 
  (OfficeActivity 
  | where TimeGenerated >= ago(1d) 
  | where RecordType =~ szSharePointFileOperation 
  | where Operation in~ (szOperations)
  )
  on UserAgent
  | summarize StartTimeUtc = min(TimeGenerated), EndTimeUtc = max(TimeGenerated), count() by RecordType, Operation, UserAgent, UserType, UserId, ClientIP, OfficeWorkload, Site_Url
  | extend timestamp = StartTimeUtc, AccountCustomEntity = UserId, IPCustomEntity = ClientIP
  | order by UserAgent asc, Operation asc, UserId asc

 

6 Replies

@Jafar1970 

 

Have you tried a line like this before the final summarize

 

  | where UserId !="Backup"
@Clive Waston

It did not work before the final summarize, Is there another option?

@Jafar1970 

 

What is in the USerID column (I assume that the user backup shows in there?), can you paste the output here? 

 

 

I think I used an uppercase B, can you try a lowercase?  Does the USerId startwith "backup", in that case you startswith e.g.

OfficeActivity
| where UserId startswith "backup" 
| summarize by UserId

OfficeActivity
| summarize count() by UserId

 

 

 

 

Yes, it starts with ''backup'' (lowercase). so where exactly I must write | where UserId !="Backup" in the script

@Jafar1970

 

As early as you can, maybe after:

 OfficeActivity
  | where TimeGenerated between(ago(14d)..ago(1d))

 

Does it start with "backup" or that it?

 

OfficeActivity
| where UserId !startswith "backup"
| summarize count() by UserId

  

 

clipboard_image_2.png

To avoid the confusion of where to write that line--  Simply- Run the original query then drill into  one of the results you want to exclude which is "backup" in your case. So if you have service account for it, simply click on 3 dots shown before UserID and select Exclude.  This will append your query and use it. 

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies