Forum Discussion

fishermc's avatar
fishermc
Copper Contributor
Feb 18, 2019
Solved

Azure Log search - Login search question

With having the ability to search sing-in logs I am trying to figure out the correct query for the following. I want to search for when a single account signs in from multiple IPs. My end goal here i...
  • Hi,

    I do not have Azure AD logs in my env but I can simulate the same thing via Azure Activity logs. The most basic query is this:

    AzureActivity 
    | extend httpdata = parse_json(HTTPRequest) 
    | summarize AggregatedValue = dcount(tostring(httpdata.clientIpAddress))  by ResourceId

    Don't mind the usage of parse_json that is specific for that log. The most important to notice is that I use dcount() and  count it by Resource Id. In your case inside dcount will be the column of the IP address and ResourceId for you will be the user name. You will not get a list of which are IPs but you will get their count. This is the most basic query that should work for the most basic number of results alert.

     

    Mark this reply as answer if it has helped you.

Resources