SOLVED

'where' operator: Failed to resolve table or column expression named 'SecurityEvent'

Copper Contributor

Hello Community,

 

Whenever I attempt to run the following Log Analytic query in Azure Log Analytics I get the following error:

'where' operator: Failed to resolve table or column expression named 'SecurityEvent'

I think it's because I need to enable 'SecurityEvent' in Log Analytics but I'm not sure. I was wondering if someone could provide a guide;

 

 SecurityEvent
| where AccountType == "User" and EventID == 4625 and TimeGenerated > ago(6h)
| summarize IPCount = dcount(IpAddress), makeset(IpAddress) by Account
| where IPCount > 5
| sort by IPCount desc

 

 Any ideas would be much appreciated.

 

Cheers

10 Replies

The Security and Compliance solution has to be added to log security events.

Hi Travis,

 

Thanks for getting in touch. 

 

Can you let me know how to add the Security and Compliance solution to the log security events?

 

Will I then be able to get a result from the script from Log Analytics?

 

Cheers

Travis,

 

The reason I asked how to " add the Security and Compliance solution to the log security events?" is because I believe I have already added it. However, when I run the query I get the same error

best response confirmed by Carlton Patterson (Copper Contributor)
Solution

I posted a video with a walkthrough on log collection setup. The quick version is to go into the Log Analytics workspace in Azure, Go to Workspace Overview and Add.  Scroll down to the Security and Compliance solution.   

 

You could also try going into Logs (Preview) for Advanced Log Analytics and check what shows in the Schema.

 

http://www.ciraltos.com/azure-oms-step-by-step-log-collection-setup/

Hi Travis,

 

I haven't checked out the video yet, but just wanted to say thanks.

 

I will check it out later this afternoon.

 

Cheers

Hello Travis, 

 

I tried to access the link you provided for the first time today, but the site appears to be down.

 

Can you provide another link?

 

If I don't hear from you I'll submit another question, as I'm not sure if you'll see this once it has been answered.

 

Cheers

Sorry about that.  My site is hosted in the Azure South Central region and that seems to be offline this morning.  Here is a link to the video in YouTube. https://www.youtube.com/watch?v=OI2iUIh340U&list=PLnWpsLZNgHzVXXyN9a0jm9xNNDrikHf8I&index=3&t=0s

In this video I give a step by step overview of how to setup log collection for Azure OMS Log Analytics. I include setting up log collection for Azure and non-Azure Virtual Machines. Click below for information on setting up an OMS Workspace ...

Hi Travis,

 

Fantastic video .. very informative. Thanks

 

Unfortunately, the video doesn't cover adding Security Policy to allow the the following query from being added with the error:

 

'where' operator: Failed to resolve table or column expression named 'SecurityEvent'.

 

SecurityEvent
| where TimeGenerated > ago(30m)
| count

 

 

@Carlton Patterson  select scope beside run query button and scope to your resource.

1 best response

Accepted Solutions
best response confirmed by Carlton Patterson (Copper Contributor)
Solution

I posted a video with a walkthrough on log collection setup. The quick version is to go into the Log Analytics workspace in Azure, Go to Workspace Overview and Add.  Scroll down to the Security and Compliance solution.   

 

You could also try going into Logs (Preview) for Advanced Log Analytics and check what shows in the Schema.

 

http://www.ciraltos.com/azure-oms-step-by-step-log-collection-setup/

View solution in original post