Getting an error "BadArgumentError- 'where' operator: Failed to resolve table or column expression named 'AzureDiagnostics'"

Jatin Lingwal 20 Reputation points
2023-05-24T16:11:37.9833333+00:00

Getting an error while creating an alert on the Monitor dashboard under the condition of the custom log search query. The query is " AzureDiagnostics 
| where Category == "Authentication" and OperationName == "CredentialCreated" and Result == "Success" 
| where TimeGenerated > ago(30d) 
| where CredentialEndDate < now() + 7d "

and error "BadArgumentError- 'where' operator: Failed to resolve table or column expression named 'AzureDiagnostics'"

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,645 questions
0 comments No comments
{count} votes

Accepted answer
  1. AnuragSingh-MSFT 21,546 Reputation points Moderator
    2023-05-25T09:46:40.97+00:00

    @Jatin Lingwal , thank you for posting this question on Microsoft Q&A.

    I understand that you are trying to query AzureDiagnostics table in Log Analytics workspace. The error that you are getting is because AzureDiagnostics table does not have the following columns as used in the query:

    • CredentialEndDate
    • Result

    To resolve this error, use only those columns names in query with where operator, which are available in this table. To get the list columns available with this table, please see Azure Monitor Logs: AzureDiagnostics.

    Hope this helps.

    If the answer did not help, please add more context/follow-up question for it, and we will help you out. Else, if the answer helped, please click Accept answer so that it can help others in the community looking for help on similar topics.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.