Failed attempt to access Azure Portal
Description
'Access attempts to Azure Portal from an unauthorized user. Either invalid password or the user account does not exist.'
Query · kql
SigninLogs | where AppDisplayName contains "Azure Portal" // 50126 - Invalid username or password, or invalid on-premises username or password. // 50020? - The user doesn't exist in the tenant. | where ResultType in ( "50126" , "50020") | extend OS = DeviceDetail.operatingSystem, Browser = DeviceDetail.browser | extend StatusCode = tostring(Status.errorCode), StatusDetails = tostring(Status.additionalDetails) | extend State = tostring(LocationDetails.state), City = tostring(LocationDetails.city) | summarize StartTime = min(TimeGenerated), EndTime = max(TimeGenerated), IPAddresses = makeset(IPAddress), DistinctIPCount = dcount(IPAddress), makeset(OS), makeset(Browser), makeset(City), AttemptCount = count() by UserDisplayName, UserPrincipalName, AppDisplayName, ResultType, ResultDescription, StatusCode, StatusDetails, Location, State | extend timestamp = StartTime, AccountCustomEntity = UserPrincipalName | sort by AttemptCount