Create and Manage Watchlists
Earn 25 points (50 with Pro) in two steps
- ① Read through the lesson — each section gets a ✓ as you scroll through it.
- ② When every section has a ✓, tap Complete lesson.
0 of 11 read · keep scrolling
✦ See fewer ads and earn double points — 50 a lesson instead of 25 — with Pro
Lesson: Create and Manage Watchlists in Microsoft Sentinel
Introduction: The Power of Context in Security Operations
In the world of security operations, data is abundant, but context is often scarce. When a security analyst looks at a log entry—perhaps a suspicious login from an unfamiliar IP address—the raw data tells only half the story. Without knowing if that IP address belongs to a known malicious actor, a partner organization, or a high-value internal server, the analyst is forced to perform manual research. This is where Microsoft Sentinel Watchlists become invaluable.
A Watchlist is essentially a collection of data that you import into Microsoft Sentinel to provide context to your security investigations. By maintaining lists of entities—such as user names, IP addresses, file hashes, or domain names—you can map your incoming log data against these known entities in real-time. This capability transforms generic alerts into prioritized, actionable intelligence. Instead of manually checking a list of 500 compromised IP addresses against your logs, you configure a Watchlist once, and the correlation happens automatically.
This lesson explores how to design, create, and manage these Watchlists. We will move beyond the basic setup to discuss how to integrate them into your detection logic, automate their updates, and maintain their accuracy over time. By the end of this module, you will understand how to shift your security operations from reactive investigation to proactive, context-aware threat detection.
Not read yet
Understanding the Role of Watchlists
Before we dive into the technical steps, it is important to understand what a Watchlist actually is from a data perspective. Think of a Watchlist as a read-only table that you upload to your Sentinel workspace. Once uploaded, this table becomes available for use in Kusto Query Language (KQL) queries, just like any other table in your workspace.
Why Use Watchlists Instead of Hard-coding Values?
Many analysts start by hard-coding lists of malicious indicators directly into their detection rules. For example, you might write a query that looks for a specific list of 20 IP addresses. While this works for a small set of data, it quickly becomes a management nightmare. If you need to update that list daily, you have to edit 20 different detection rules.
Watchlists solve this by decoupling the data from the query. You store the data in the Watchlist and reference the Watchlist name in your query. When the data changes, you update the Watchlist, and every detection rule that references it automatically uses the new data. This is the difference between manual maintenance and scalable security operations.
Callout: Watchlists vs. Threat Intelligence A common question is how Watchlists differ from Threat Intelligence (TI). Threat Intelligence typically refers to external feeds (like STIX/TAXII or Microsoft-provided feeds) that track known global threats. Watchlists are for your internal, organization-specific data. Use TI for global indicators (e.g., known botnet IPs) and Watchlists for internal context (e.g., a list of VIP users, sensitive server IPs, or approved software hashes in your specific environment).
Not read yet
Preparing Your Data for Import
The quality of your security detection depends entirely on the quality of your input data. Before you upload a file to Microsoft Sentinel, you must ensure it is formatted correctly. Sentinel supports CSV files for Watchlist ingestion, and the formatting requirements are straightforward but strict.
Data Formatting Requirements
- Header Row: The first row of your CSV must contain the column names. These names will become the field names you use in your KQL queries.
- Search Key: Every Watchlist requires a "Search Key." This is a unique identifier within your file that you will use to perform joins in KQL. For example, if your file contains a list of IP addresses, the column named
IPAddresswould be your search key. - File Size Limits: Currently, Watchlists have a limit of 3.8 MB per file. If you have a list that exceeds this size, you should consider breaking it into smaller, logical segments or using a different data ingestion method like the Log Analytics Data Collector API.
- Encoding: Ensure your file is saved in UTF-8 format to avoid issues with special characters or unexpected encoding errors during the import process.
Designing Your First Watchlist
Let's imagine a scenario where you need to monitor for unauthorized access to your "Critical Servers." You have a list of IP addresses for these servers. Your CSV file should look like this:
ServerName,IPAddress,Department,Owner
Prod_DB_01,10.0.5.12,Finance,John Doe
Prod_Web_01,10.0.5.15,Marketing,Jane Smith
Prod_App_01,10.0.5.20,HR,Robert Brown
In this example, IPAddress is the most logical Search Key because your log data (like SigninLogs) will contain IP addresses that you can join against this list.
Not read yet
Step-by-Step: Creating a Watchlist
Now that your data is prepared, let's walk through the process of creating the Watchlist within the Microsoft Sentinel portal.
The Creation Process
- Navigate to Sentinel: Open the Microsoft Sentinel portal and select the workspace you are working in.
- Access Watchlists: In the left-hand menu, scroll down to the Configuration section and click on Watchlists.
- Add New: Click the + Add new button at the top of the screen.
- General Information: Provide a descriptive name for the Watchlist (e.g.,
CriticalServerList). You can also add a description to help other analysts understand the purpose of the list. - Source Configuration: Select Upload from local file. Browse and select your prepared CSV file.
- Review Columns: Sentinel will automatically detect the columns. Verify that the data types are correct (e.g., IP addresses should be treated as strings).
- Select Search Key: Choose the column you want to use for joins. In our example, select
IPAddress. - Complete: Click Create.
Tip: Naming Conventions Adopt a consistent naming convention for your Watchlists, such as
Org_Category_Description. For example,Corp_Servers_CriticalorCorp_Users_VIP. This makes it much easier to find and manage your lists as your environment grows to dozens or hundreds of Watchlists.
Not read yet
Utilizing Watchlists in KQL Queries
Once the Watchlist is created, it is effectively a table in your workspace. You can access it using the _GetWatchlist() function in KQL. This is the core of how Watchlists provide value to your SOC team.
Basic KQL Integration
To view the contents of your Watchlist, you simply run:
_GetWatchlist('CriticalServerList')
This returns the entire table. However, the real power comes when you join this data with your security logs. Let’s look at an example where we want to find any sign-ins to our critical servers from outside the office network.
// Define our watchlist
let CriticalServers = _GetWatchlist('CriticalServerList');
// Query the sign-in logs
SigninLogs
| where TimeGenerated > ago(24h)
// Join with the watchlist on the IP address
| join kind=inner (CriticalServers) on $left.IPAddress == $right.IPAddress
// Filter for specific conditions
| where IPAddress != "192.168.1.1" // Assuming this is the office gateway
| project TimeGenerated, UserPrincipalName, IPAddress, ServerName, Department
In this query, the join operator matches the IPAddress from the SigninLogs table with the IPAddress from your CriticalServerList Watchlist. Any match effectively flags that sign-in as occurring on a critical server, allowing you to trigger an alert.
Performance Considerations
Joins can be resource-intensive if not handled correctly. When working with large datasets, always try to filter your primary log data (e.g., by time or event type) before performing the join. The kind=inner join is usually the most efficient for Watchlist lookups because it discards any records that do not find a match in both sets.
Not read yet
Best Practices for Maintaining Watchlists
A Watchlist is only as good as its data. If you create a list of "Terminated Employees" but fail to update it when someone leaves the company, your security controls will be ineffective.
1. Automate Updates
Do not rely on manual CSV uploads for data that changes frequently. If your HR system or CMDB (Configuration Management Database) contains the data you need for a Watchlist, use an automation tool. You can use Azure Logic Apps to pull data from your internal systems and update the Watchlist via the Microsoft Graph API or PowerShell scripts.
2. Versioning and Documentation
Keep a record of who created the Watchlist and why. If you are using a script to populate the Watchlist, store that script in a version control system like GitHub or Azure DevOps. This ensures that you can recreate the Watchlist if it is accidentally deleted or corrupted.
3. Monitoring Watchlist Usage
Periodically review which Watchlists are actually being used. If you have a Watchlist that hasn't been referenced in a KQL query for six months, it might be time to archive or delete it. This keeps your environment clean and reduces the cognitive load on your analysts.
Warning: Data Sensitivity Be extremely cautious about the data you include in Watchlists. If your Watchlist contains PII (Personally Identifiable Information) or sensitive internal configuration details, ensure that access to the Watchlist is restricted to authorized security personnel via RBAC (Role-Based Access Control). Do not include passwords or secret keys in Watchlists.
Not read yet
Common Mistakes and How to Avoid Them
Mistake 1: Using the Wrong Data Type
A common error is uploading a file where columns are misidentified. For example, if a list of file hashes is treated as a numeric type instead of a string, your join queries will fail or return incorrect results. Always verify the data types in the Watchlist configuration screen during the import process.
Mistake 2: Missing the Search Key
If you forget to define a Search Key, or if you choose a column that does not contain unique values, your queries will return unexpected results. If your intended Search Key is not unique (e.g., multiple entries for the same IP), the join operator will return a row for every match, which can lead to "alert fatigue" where a single event triggers multiple alerts.
Mistake 3: Stale Data
This is the most common failure point. If your Watchlist data is weeks or months old, it is essentially useless. Always check the "Last Modified" timestamp on your Watchlists. If you find yourself manually updating a list more than once a week, it is time to build an automation pipeline.
Mistake 4: Over-complicating Queries
Don't try to cram too much logic into a single query. If you have a very complex join, break it down into smaller, modular queries using the let statement. This makes your code easier to read and troubleshoot when an alert doesn't fire as expected.
Not read yet
Comparison: Watchlists vs. Other Contextual Methods
To help you decide when to use a Watchlist versus other Sentinel features, refer to the following table:
| Feature | Best Used For | Frequency of Change |
|---|---|---|
| Watchlist | Internal entities (Users, IPs, Servers) | Daily to Weekly |
| Threat Intelligence | Known external bad actors | Real-time (via API) |
| ASIM (Normalization) | Standardizing log formats | Static (Schema-based) |
| Azure Resource Graph | Real-time cloud asset inventory | Real-time |
Advanced Management: Using PowerShell for Watchlists
While the portal is great for ad-hoc tasks, professional SOC teams often rely on PowerShell for managing Watchlists at scale. The Az.OperationalInsights module provides cmdlets to interact with Sentinel Watchlists.
Example: Updating a Watchlist via PowerShell
If you have a CSV file locally, you can update an existing Watchlist with the following script:
# Define parameters
$resourceGroupName = "MyResourceGroup"
$workspaceName = "MySentinelWorkspace"
$watchlistName = "CriticalServerList"
$filePath = "C:\Data\UpdatedServers.csv"
# Update the watchlist
New-AzSentinelWatchlist -ResourceGroupName $resourceGroupName `
-WorkspaceName $workspaceName `
-WatchlistAlias $watchlistName `
-File $filePath `
-Provider "MyCompany" `
-Source "LocalFile"
Note: The New-AzSentinelWatchlist cmdlet is used for both creating and updating existing watchlists in many versions of the module. Always test your scripts in a development workspace before running them against your production environment.
Not read yet
Practical Scenario: Monitoring VIP User Accounts
Let’s look at a concrete example. You want to monitor all authentication attempts for a group of "VIP" users (executives) to ensure no brute force attacks are targeting them.
- Create the Watchlist: Prepare a CSV with
UserPrincipalNameas the header and the list of VIP email addresses. Name the WatchlistVIP_Users. - Define the Detection Rule: Create a new Analytic Rule in Sentinel.
- KQL Logic:
let VIPUsers = _GetWatchlist('VIP_Users') | project UserPrincipalName; SigninLogs | where UserPrincipalName in (VIPUsers) | summarize Count = count() by UserPrincipalName, bin(TimeGenerated, 5m) | where Count > 10 - Result: This rule will now alert you if any of your VIP users experience more than 10 sign-in attempts in a 5-minute window. If a new executive joins the company, you simply update the CSV, and they are automatically protected by this rule.
Not read yet
Troubleshooting Common Issues
"The Watchlist is not returning any data"
If your query returns no results, first run _GetWatchlist('YourWatchlistName') by itself in the KQL editor. If this returns an empty result set, the data was not imported correctly. Check your CSV format and ensure the file was not empty. If the Watchlist returns data but your join does not, verify that the values in your log data match the values in your Watchlist (e.g., check for case sensitivity or leading/trailing whitespace).
"Query timed out"
If your query is timing out, it is likely because you are performing a join against a very large dataset. Ensure you are filtering your log data by a specific time range (e.g., where TimeGenerated > ago(1h)) before attempting the join.
"Permissions issues"
Ensure that the user account running the query has the Microsoft Sentinel Contributor or Microsoft Sentinel Responder role. Access to Watchlists is governed by the same RBAC as the rest of the Sentinel workspace.
Not read yet
Summary and Key Takeaways
As we conclude this lesson, remember that Watchlists are one of the most effective ways to bridge the gap between "noise" and "intelligence" in your security environment. By moving from hard-coded values to dynamic, context-rich Watchlists, you create a more resilient and manageable security operation.
Key Takeaways:
- Context is King: Watchlists provide the internal context required to make sense of raw security logs.
- Decouple for Scalability: Always separate your data from your queries. This allows you to update your threat landscape without touching your detection rule code.
- Automation is Essential: For data that changes frequently, use APIs or automation scripts to keep your Watchlists current. Manual updates are prone to error and neglect.
- Formatting Matters: Follow strict CSV formatting rules, including clear headers and unique Search Keys, to ensure your joins function reliably.
- Prioritize Performance: Always filter your log data before performing joins in KQL to keep your queries fast and efficient.
- Audit Regularly: Periodically review your Watchlists to ensure they are still relevant and being used. Remove stale or redundant lists to maintain a clean environment.
- Security First: Treat your Watchlists as sensitive data. Use RBAC to control who can view or modify them, and never store credentials or secrets within them.
By mastering the creation and management of Watchlists, you are taking a significant step toward a more proactive and sophisticated security posture in Microsoft Sentinel. Start small by identifying one or two repetitive tasks—like monitoring a specific list of servers or users—and build your first Watchlist today.
Not read yet
Each section gets a ✓ as you scroll through it. Tap the button to jump to the next one.
- Investigate Security Incidents
- Investigate Security Incidents Quiz5q
- Manage Incidents in Defender Portal
- Manage Incidents in Defender Portal Quiz5q
- Investigate Alerts and Alert Queues
- Investigate Alerts and Alert Queues Quiz5q
- Automated Investigation and Response
- Automated Investigation and Response Quiz5q
Spend your points to unlock exam-style practice questions
Spend points to unlock SC-200 exam-style practice questions.
Practice for SC-200