Azure Log Analytics
Query Azure Log Analytics and manage saved searches
Runs KQL queries against a Log Analytics workspace, manages its saved searches through Azure Resource Manager, and sends any Azure Resource Manager or Log Analytics request with the connector's own token.
azure-log-analytics-v2_3.0.0.tgz
Community code that runs on your platform. A maintainer reviewed this exact source; the download is rebuilt from it. Follow the to install it.
Connector for Azure Log Analytics (v2, the next major version of the stock 2.0.1 connector). Execute Query returns every result table, the primary table's records and the row count, and can query several workspaces at once. List, Get, Create, Update and Delete Saved Search manage saved searches. Execute API Request calls any management or Log Analytics endpoint. Authentication is a Microsoft Entra ID app registration (client credentials); the app needs Log Analytics Reader on the workspace to query and Log Analytics Contributor to write saved searches.
Live-tested on FortiSOAR 8.0.1 against a Log Analytics workspace: all seven operations ran, and the success and error mocks are captured from that run.
Not live-tested
- The 429 status is synthetic: Azure throttling cannot be provoked on demand.
- Delete Saved Search reports success for a saved search that does not exist: Azure Resource Manager treats DELETE as idempotent. The refusal captured for that action is a missing workspace.
Permissions
Microsoft Entra ID app registration (client credentials) with Log Analytics Reader on the workspace (queries) and Log Analytics Contributor (saved searches).
Configuration · 11 fields
- Tenant ID
tenant_idtext requiredID of the Microsoft Entra ID tenant that holds the app registration.
- Client ID
client_idtext requiredApplication (client) ID of the Entra ID app registration used to request access tokens.
- Client Secret
client_secretpassword requiredClient secret value of the Entra ID app registration.
- Subscription ID
subscription_idtext requiredSubscription that holds the Log Analytics workspace. Needed for saved searches.
- Resource Group Name
resource_group_nametext requiredResource group that holds the Log Analytics workspace. Needed for saved searches.
- Default Workspace ID
workspace_idtextOptional workspace (customer) ID used by Execute Query when the action does not set one.
- Default Workspace Name
workspace_nametextOptional workspace name used by the saved-search actions when the action does not set one.
- Verify SSL
verify_sslcheckboxVerify the TLS certificates of Microsoft Entra ID and Azure endpoints. On by default.
Default
true - Authority Host
authority_hosttextOptional. Leave empty for the public cloud (login.microsoftonline.com). Set it for a sovereign cloud or a test double.
- Management Host
management_hosttextOptional. Leave empty for https://management.azure.com.
- Log Analytics Host
loganalytics_hosttextOptional. Leave empty for https://api.loganalytics.io.
Operations · 7
Execute Query 4 params
execute_queryexecute_queryRuns a KQL query against a Log Analytics workspace and returns every result table, the primary table's records and the row count.
- Workspace ID
workspace_idtextWorkspace (customer) ID to query. Leave empty to use the configuration's default workspace ID.
- Query
querytext requiredKQL query to run, for example: SeedAuth_CL | where ResultCode != 0 | take 10
- TimeSpan
timespantextOptional ISO 8601 duration applied in addition to any time filter in the query, for example PT12H.
- Additional Workspaces
workspace_nametextOptional comma-separated workspace names or IDs to include in a cross-workspace query.
Returnstablesprimary_tablecolumnsrecordsrow_countList Saved Searches 1 param
list_saved_searcheslist_saved_searchesLists the saved searches of a Log Analytics workspace through Azure Resource Manager.
- Workspace Name
workspace_nametextWorkspace name. Leave empty to use the configuration's default workspace name.
ReturnsvaluecountGet Saved Search 2 params
get_saved_searchesget_saved_searchesRetrieves one saved search of a Log Analytics workspace by its ID.
- Saved Search ID
savedSearchIdtext requiredID of the saved search to retrieve.
- Workspace Name
workspace_nametextWorkspace name. Leave empty to use the configuration's default workspace name.
ReturnsidnameetagtypepropertiesCreate Saved Search 7 params
create_saved_searchescreate_saved_searchesCreates (or overwrites) a saved search in a Log Analytics workspace through Azure Resource Manager.
- Saved Search ID
savedSearchIdtext requiredID to give the new saved search. An existing saved search with the same ID is replaced.
- Workspace Name
workspace_nametextWorkspace name. Leave empty to use the configuration's default workspace name.
- Category
categorytext requiredCategory of the saved search. Categories help users find it in the Log Analytics portal.
- Display Name
displayNametext requiredDisplay name of the saved search.
- Query
querytext requiredKQL query of the saved search.
- ETag
etagtextOptional ETag. When set, the write is refused if the saved search has changed since it was read.
- Additional Fields
additional_fieldsjsonOptional JSON object of extra saved-search properties, for example {"functionAlias": "FailedSignIns"}.
ReturnsidnameetagtypepropertiesUpdate Saved Search 6 params
update_saved_searchesupdate_saved_searchesUpdates an existing saved search of a Log Analytics workspace. The write overwrites the saved search whatever its ETag.
- Saved Search ID
savedSearchIdtext requiredID of the saved search to update.
- Workspace Name
workspace_nametextWorkspace name. Leave empty to use the configuration's default workspace name.
- Category
categorytext requiredCategory of the saved search.
- Display Name
displayNametext requiredDisplay name of the saved search.
- Query
querytext requiredKQL query of the saved search.
- Additional Fields
additional_fieldsjsonOptional JSON object of extra saved-search properties.
ReturnsidnameetagtypepropertiesDelete Saved Search 2 params
delete_saved_searchdelete_saved_searchDeletes one saved search of a Log Analytics workspace.
- Saved Search ID
savedSearchIdtext requiredID of the saved search to delete.
- Workspace Name
workspace_nametextWorkspace name. Leave empty to use the configuration's default workspace name.
ReturnsresultsavedSearchIdExecute API Request 5 params
execute_api_requestexecute_api_requestCalls any endpoint of Azure Resource Manager (management) or the Log Analytics data plane with the connector's own Entra ID credentials. Pass a path, not a full URL, so the token only reaches the configured host.
- Service
serviceselectmanagement for management.azure.com, loganalytics for api.loganalytics.io.
Default
managementOptions managementloganalytics - Method
methodselectHTTP method.
Default
GETOptions GETPOSTPUTPATCHDELETE - Endpoint
endpointtext requiredPath on the chosen service, for example /subscriptions/<subscription-id>/resourcegroups/<resource-group>/providers/Microsoft.OperationalInsights/workspaces?api-version=2020-08-01 (query parameters may be given here or in Query Parameters).
- Query Parameters
query_paramsjsonOptional JSON object of query parameters. The api-version defaults to the one the service needs.
- Request Body
request_bodyjsonOptional JSON object sent as the request body.
Returnsservicemethodendpointresponse