Explore Security Copilot embedded experiences across Defender XDR, Sentinel, Entra, Intune, and Purview. Apply Zero Trust principles with Conditional Access, least privilege roles, PIM, and phased deployment.
Microsoft Security Copilot offers two distinct experiences: the standalone portal at securitycopilot.microsoft.com for cross-product investigations, and embedded side panels built directly into Microsoft security products such as Defender XDR, Sentinel, Entra, Intune, and Purview. Each embedded experience is scoped to the product’s data, providing contextual AI assistance without switching windows.
This lab also covers the Zero Trust framework for deploying Security Copilot securely. Zero Trust assumes breach and verifies every access request explicitly. You will configure Conditional Access policies, enforce least privilege with Copilot-specific roles, enable Privileged Identity Management (PIM) for time-bound access, secure privileged access workstations, and plan a phased deployment from evaluation through full rollout.
Microsoft’s security platform is built on the idea that defenders need a unified view across identity, endpoints, cloud, data, and applications. Six pillars - AI, XDR, SIEM, Cloud Security, Exposure Management, and Threat Intelligence - converge into one ecosystem that spans Prevent, Detect, Investigate, and Respond.
But even with this integrated foundation, humans still shoulder the responsibility of connecting signals and determining next steps. An analyst looking at a Defender XDR incident must manually correlate it with Sentinel detections, enrich it with threat intelligence, check exposure data, and decide on response actions across multiple portals.
Security Copilot changes that. By embedding AI directly into this unified SOC, we gain intelligence that understands context, recognises threat patterns, and guides analysts with clear next-step reasoning. It reads across all six pillars simultaneously - correlating XDR alerts with SIEM detections, enriching them with threat intelligence, factoring in exposure data, and recommending response actions. It turns a connected SOC into an intelligent SOC.
And that intelligence is key as we move toward the next evolution: autonomous protection. Today, Copilot assists analysts with recommendations and guided response. Tomorrow, trusted AI agents will detect, investigate, and contain threats independently - with human oversight at decision points. The journey from manual SOC → connected SOC → intelligent SOC → autonomous SOC is the trajectory this lab prepares you for.
Scenario: A global financial services firm is deploying Security Copilot to its 50-person SOC. They need to configure embedded experiences in Defender XDR and Sentinel for Tier 1 analysts, restrict standalone portal access to Tier 2/3 analysts, and ensure the entire deployment meets their Zero Trust maturity requirements before the auditors review next quarter.
The Challenge:
The Solution: By applying Zero Trust principles systematically - Conditional Access, least privilege roles, PIM, privileged access devices, and phased deployment with monitoring - the firm deploys Security Copilot securely while meeting audit requirements and ensuring each analyst tier gets the right level of access.
Security Copilot is a powerful tool that processes sensitive security data across your entire Microsoft security stack. Without proper Zero Trust controls, you risk over-provisioning access, exposing sensitive investigation data to unauthorised users, and failing compliance audits. Embedded experiences allow you to meet analysts where they work - inside the security products they already use daily - while controlling data scope. Combined with Conditional Access, PIM, and a phased deployment model, you ensure that Copilot adoption is secure, auditable, and aligned with your organisation’s Zero Trust maturity journey.
Microsoft Security Copilot provides two complementary access modes. Understanding the differences is critical for planning role-based access and deployment scope.
| Capability | Standalone | Embedded |
|---|---|---|
| Cross-product queries | โ | โ (product-scoped) |
| Promptbooks | โ | โ |
| Session management | โ | Limited |
| Custom plugins | โ | โ |
| Guided prompts | Manual | โ (pre-built) |
| Context awareness | User provides | โ (auto from product) |
| SCU consumption | Per prompt | Per prompt |
The Defender XDR embedded experience is the most feature-rich, offering incident summarisation, script analysis, guided response, and natural language to KQL generation directly within the incident workflow.
# Verify that Security Copilot is enabled for Defender XDR
# This checks the current user's access to the Security Copilot service principal
# and confirms the Defender XDR plugin is active
Connect-MgGraph -Scopes "Application.Read.All","SecurityEvents.Read.All"
# Check Security Copilot service principal exists in tenant
$copilotSP = Get-MgServicePrincipal -Filter "displayName eq 'Security Copilot'"
if ($copilotSP) {
Write-Host "โ
Security Copilot service principal found" -ForegroundColor Green
Write-Host " App ID: $($copilotSP.AppId)"
Write-Host " Object ID: $($copilotSP.Id)"
} else {
Write-Host "โ Security Copilot service principal not found" -ForegroundColor Red
}
# Verify current user has Security Copilot role assignments
$currentUser = Get-MgContext
Write-Host "`nCurrent user: $($currentUser.Account)"
# List Defender XDR incidents to confirm data access
$incidents = Invoke-MgGraphRequest -Method GET `
-Uri "https://graph.microsoft.com/v1.0/security/incidents?`$top=5"
Write-Host "`nRecent Defender XDR incidents accessible: $($incidents.value.Count)"The Sentinel embedded experience brings Copilot directly into the incident investigation workflow, providing AI-powered summarisation and analysis scoped to Sentinel data.
// KQL - Verify Sentinel incidents are accessible to Copilot
// Run this in the Sentinel Logs blade to confirm data availability
// Copilot uses the same data access permissions as the signed-in user
SecurityIncident
| where TimeGenerated > ago(7d)
| summarize
TotalIncidents = count(),
OpenIncidents = countif(Status == "New" or Status == "Active"),
ClosedIncidents = countif(Status == "Closed")
| extend CopilotReady = iff(TotalIncidents > 0, "โ
Incidents available for Copilot", "โ ๏ธ No recent incidents found")
| project CopilotReady, TotalIncidents, OpenIncidents, ClosedIncidentsSecurity Copilot embedded experiences extend to identity, device management, and data security products, each providing contextual AI assistance.
Conditional Access is the first Zero Trust control to deploy. You will create a policy that requires MFA and compliant devices for all Security Copilot access, and blocks legacy authentication protocols.
# Configure Conditional Access Policy for Security Copilot
# Requires: Microsoft.Graph.Identity.SignIns module
# Scope: Targets privileged security roles accessing Security Copilot
# Controls: MFA + compliant device + block legacy auth
Connect-MgGraph -Scopes "Policy.ReadWrite.ConditionalAccess","Application.Read.All"
# Get the Security Copilot service principal App ID
$copilotApp = Get-MgServicePrincipal -Filter "displayName eq 'Security Copilot'"
$copilotAppId = $copilotApp.AppId
# Get the security group for Copilot users
$copilotUsersGroup = Get-MgGroup -Filter "displayName eq 'SG-SecurityCopilot-Users'"
# Define the Conditional Access policy
$policyParams = @{
DisplayName = "CA-SecurityCopilot-RequireMFA-CompliantDevice"
State = "enabledForReportingButNotEnforced" # Report-only first
Conditions = @{
Applications = @{
IncludeApplications = @($copilotAppId)
}
Users = @{
IncludeGroups = @($copilotUsersGroup.Id)
}
ClientAppTypes = @("browser", "mobileAppsAndDesktopClients")
}
GrantControls = @{
BuiltInControls = @("mfa", "compliantDevice")
Operator = "AND"
}
SessionControls = @{
SignInFrequency = @{
Value = 4
Type = "hours"
IsEnabled = $true
}
}
}
# Create the policy in report-only mode
$policy = New-MgIdentityConditionalAccessPolicy -BodyParameter $policyParams
Write-Host "โ
CA policy created: $($policy.DisplayName)" -ForegroundColor Green
Write-Host " Policy ID: $($policy.Id)"
Write-Host " State: $($policy.State) (report-only - review before enforcing)"
# Block legacy authentication - separate policy
$legacyBlockParams = @{
DisplayName = "CA-SecurityCopilot-BlockLegacyAuth"
State = "enabledForReportingButNotEnforced"
Conditions = @{
Applications = @{
IncludeApplications = @($copilotAppId)
}
Users = @{
IncludeGroups = @($copilotUsersGroup.Id)
}
ClientAppTypes = @("exchangeActiveSync", "other")
}
GrantControls = @{
BuiltInControls = @("block")
Operator = "OR"
}
}
$legacyPolicy = New-MgIdentityConditionalAccessPolicy -BodyParameter $legacyBlockParams
Write-Host "โ
Legacy auth block policy created: $($legacyPolicy.DisplayName)" -ForegroundColor GreenSecurity Copilot has two specific roles: Copilot Owner (full administrative control including SCU management and plugin configuration) and Copilot Contributor (can create sessions, run Promptbooks, and use all Copilot features without administrative access). Apply least privilege by assigning the minimum role needed.
| Capability | Copilot Owner | Copilot Contributor |
|---|---|---|
| Create sessions & run prompts | โ | โ |
| Create & share Promptbooks | โ | โ |
| Use embedded experiences | โ | โ |
| Manage SCU capacity | โ | โ |
| Configure plugins | โ | โ |
| Manage role assignments | โ | โ |
# Review current Security Copilot role assignments
# Remove default "All Users" from Contributor and assign specific security groups
# Principle: Only SOC analysts and security engineers should have Copilot access
Connect-MgGraph -Scopes "RoleManagement.ReadWrite.Directory","Group.Read.All"
# Get Copilot role definitions
$copilotOwnerRole = Get-MgRoleManagementDirectoryRoleDefinition `
-Filter "displayName eq 'Security Copilot Owner'"
$copilotContribRole = Get-MgRoleManagementDirectoryRoleDefinition `
-Filter "displayName eq 'Security Copilot Contributor'"
Write-Host "Copilot Owner Role ID: $($copilotOwnerRole.Id)"
Write-Host "Copilot Contributor Role ID: $($copilotContribRole.Id)"
# List current role assignments
Write-Host "`n--- Current Copilot Owner Assignments ---"
Get-MgRoleManagementDirectoryRoleAssignment `
-Filter "roleDefinitionId eq '$($copilotOwnerRole.Id)'" |
ForEach-Object {
$principal = Get-MgDirectoryObject -DirectoryObjectId $_.PrincipalId
Write-Host " $($principal.AdditionalProperties.displayName) ($($_.PrincipalId))"
}
Write-Host "`n--- Current Copilot Contributor Assignments ---"
Get-MgRoleManagementDirectoryRoleAssignment `
-Filter "roleDefinitionId eq '$($copilotContribRole.Id)'" |
ForEach-Object {
$principal = Get-MgDirectoryObject -DirectoryObjectId $_.PrincipalId
Write-Host " $($principal.AdditionalProperties.displayName) ($($_.PrincipalId))"
}
# Create targeted security groups for role assignment
$tier1Group = Get-MgGroup -Filter "displayName eq 'SG-SOC-Tier1-Analysts'"
$tier2Group = Get-MgGroup -Filter "displayName eq 'SG-SOC-Tier2-Analysts'"
$socLeadsGroup = Get-MgGroup -Filter "displayName eq 'SG-SOC-Leads'"
# Assign Copilot Contributor to Tier 1 and Tier 2 analysts
@($tier1Group, $tier2Group) | ForEach-Object {
if ($_) {
New-MgRoleManagementDirectoryRoleAssignment -RoleDefinitionId $copilotContribRole.Id `
-PrincipalId $_.Id -DirectoryScopeId "/"
Write-Host "โ
Assigned Copilot Contributor to $($_.DisplayName)" -ForegroundColor Green
}
}
# Assign Copilot Owner to SOC Leads only (via PIM in Step 7)
Write-Host "`nโ ๏ธ Copilot Owner role should be assigned via PIM (see Step 7)" -ForegroundColor YellowPrivileged Identity Management (PIM) ensures the Copilot Owner role is only active when needed. Users must explicitly activate the role with justification, and the activation expires after a defined period.
# Configure PIM for the Security Copilot Owner role
# Requires: Microsoft.Graph.Identity.Governance module + Entra ID P2 license
# This makes the Owner role eligible (not active) with approval + justification
Connect-MgGraph -Scopes "RoleManagement.ReadWrite.Directory","PrivilegedAccess.ReadWrite.AzureADGroup"
# Get the Copilot Owner role definition
$copilotOwnerRole = Get-MgRoleManagementDirectoryRoleDefinition `
-Filter "displayName eq 'Security Copilot Owner'"
# Get the SOC Leads group (eligible for Copilot Owner)
$socLeadsGroup = Get-MgGroup -Filter "displayName eq 'SG-SOC-Leads'"
# Create PIM eligible assignment for SOC Leads
$eligibleParams = @{
Action = "adminAssign"
RoleDefinitionId = $copilotOwnerRole.Id
PrincipalId = $socLeadsGroup.Id
DirectoryScopeId = "/"
Justification = "SOC Leads eligible for Copilot Owner role via PIM"
ScheduleInfo = @{
StartDateTime = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
Expiration = @{
Type = "afterDuration"
Duration = "P365D" # Eligibility lasts 1 year, then must be renewed
}
}
}
$eligibleAssignment = New-MgRoleManagementDirectoryRoleEligibilityScheduleRequest `
-BodyParameter $eligibleParams
Write-Host "โ
PIM eligible assignment created for SOC Leads" -ForegroundColor Green
Write-Host " Role: Security Copilot Owner"
Write-Host " Group: $($socLeadsGroup.DisplayName)"
# Configure PIM role settings - activation requires approval and justification
# Maximum activation duration: 4 hours
# Require justification: Yes
# Require approval: Yes
# Approvers: Security Operations Manager group
Write-Host "`n๐ PIM Role Settings to configure in the portal:" -ForegroundColor Cyan
Write-Host " 1. Navigate to Entra admin centre > Identity Governance > PIM"
Write-Host " 2. Select 'Azure AD roles' > 'Roles' > 'Security Copilot Owner'"
Write-Host " 3. Click 'Role settings' > 'Edit'"
Write-Host " 4. Set maximum activation duration: 4 hours"
Write-Host " 5. Require justification on activation: Yes"
Write-Host " 6. Require approval to activate: Yes"
Write-Host " 7. Add approvers: SG-Security-Operations-Managers"
Write-Host " 8. Require MFA on activation: Yes"
Write-Host " 9. Click 'Update'"Zero Trust requires that privileged access to Security Copilot (especially the standalone portal) occurs only from trusted, hardened devices. Privileged Access Workstations (PAWs) provide a clean, dedicated environment for security operations.
Security Copilot supports third-party plugins that extend its capabilities. However, these plugins introduce trust boundaries that must be governed under Zero Trust principles.
A phased deployment reduces risk and allows you to validate each stage before scaling. The three phases are: Evaluate (prove value with a small group), Pilot (expand to a broader team with governance), and Full Deployment (organisation-wide rollout).
| Phase | Audience | Duration | Success Criteria |
|---|---|---|---|
| Evaluate | 3–5 senior analysts | 2–4 weeks | Positive analyst feedback, measurable triage improvement, SCU consumption within budget |
| Pilot | Full Tier 2 team (10–15 analysts) | 4–8 weeks | Consistent adoption, Promptbooks deployed, CA policies enforced, governance framework approved |
| Full Deployment | Entire SOC (all tiers) | Ongoing | All analysts onboarded, embedded experiences active, monitoring operational, audit-ready |
# Create security groups for phased Copilot deployment
# Each group controls Copilot access at a specific deployment phase
# Users move from Evaluate โ Pilot โ FullDeployment as phases progress
Connect-MgGraph -Scopes "Group.ReadWrite.All"
$phases = @(
@{
Name = "SG-Copilot-Phase1-Evaluate"
Description = "Phase 1: Evaluation group - senior analysts validating Security Copilot value and SCU consumption"
},
@{
Name = "SG-Copilot-Phase2-Pilot"
Description = "Phase 2: Pilot group - Tier 2 analysts with full Copilot access, Promptbooks, and governance framework"
},
@{
Name = "SG-Copilot-Phase3-FullDeployment"
Description = "Phase 3: Full deployment - all SOC analysts with role-appropriate Copilot access"
}
)
foreach ($phase in $phases) {
$group = New-MgGroup -DisplayName $phase.Name `
-Description $phase.Description `
-MailEnabled:$false `
-MailNickname ($phase.Name -replace '[^a-zA-Z0-9]','') `
-SecurityEnabled:$true `
-GroupTypes @()
Write-Host "โ
Created group: $($group.DisplayName) (ID: $($group.Id))" -ForegroundColor Green
}
Write-Host "`n๐ Next: Add senior analysts to Phase 1 group and assign Copilot Contributor role"Monitoring who uses Security Copilot, how often, and how much SCU they consume is essential for governance, cost management, and demonstrating value to leadership.
// KQL - Track Security Copilot usage across the organisation
// Data source: Unified Audit Log ingested into Sentinel
// Metrics: unique users, session count, prompt volume by day
AuditLogs
| where TimeGenerated > ago(30d)
| where TargetResources has "Security Copilot"
or LoggedByService == "Security Copilot"
| summarize
UniqueUsers = dcount(InitiatedBy.user.userPrincipalName),
TotalSessions = dcount(CorrelationId),
TotalPrompts = count()
by bin(TimeGenerated, 1d)
| order by TimeGenerated desc
| render timechart// KQL - Per-user Security Copilot consumption for cost allocation
// Use this to identify heavy users, low-adoption users, and unusual spikes
AuditLogs
| where TimeGenerated > ago(30d)
| where TargetResources has "Security Copilot"
or LoggedByService == "Security Copilot"
| extend UserUPN = tostring(InitiatedBy.user.userPrincipalName)
| summarize
PromptCount = count(),
SessionCount = dcount(CorrelationId),
FirstUsed = min(TimeGenerated),
LastUsed = max(TimeGenerated),
ActiveDays = dcount(bin(TimeGenerated, 1d))
by UserUPN
| extend AvgPromptsPerDay = round(todouble(PromptCount) / ActiveDays, 1)
| order by PromptCount descBeyond usage monitoring, audit for anomalous access patterns that could indicate misuse or compromise of a Security Copilot account.
// KQL - Detect anomalous Security Copilot usage patterns
// Flags: unusual hours, bulk queries, new users, and access from unusual locations
let NormalHoursStart = 6; // 06:00 local time
let NormalHoursEnd = 22; // 22:00 local time
let BulkThreshold = 50; // More than 50 prompts in 1 hour is anomalous
AuditLogs
| where TimeGenerated > ago(7d)
| where TargetResources has "Security Copilot"
or LoggedByService == "Security Copilot"
| extend
UserUPN = tostring(InitiatedBy.user.userPrincipalName),
HourOfDay = hourofday(TimeGenerated),
IPAddress = tostring(InitiatedBy.user.ipAddress)
| summarize
PromptCount = count(),
UniqueIPs = dcount(IPAddress),
Hours = make_set(HourOfDay)
by UserUPN, bin(TimeGenerated, 1h)
| where PromptCount > BulkThreshold
or Hours has_any (dynamic([0,1,2,3,4,5,23])) // Outside normal hours
| extend AnomalyType = case(
PromptCount > BulkThreshold, "Bulk query volume",
Hours has_any (dynamic([0,1,2,3,4,5,23])), "Off-hours access",
"Other"
)
| project TimeGenerated, UserUPN, PromptCount, AnomalyType, UniqueIPs// KQL - Identify first-time Security Copilot users
// Alert on users who appear for the first time - may indicate role misconfiguration
let KnownUsers = AuditLogs
| where TimeGenerated between (ago(90d) .. ago(7d))
| where TargetResources has "Security Copilot"
or LoggedByService == "Security Copilot"
| distinct tostring(InitiatedBy.user.userPrincipalName);
AuditLogs
| where TimeGenerated > ago(7d)
| where TargetResources has "Security Copilot"
or LoggedByService == "Security Copilot"
| extend UserUPN = tostring(InitiatedBy.user.userPrincipalName)
| where UserUPN !in (KnownUsers)
| summarize FirstSeen = min(TimeGenerated), PromptCount = count() by UserUPN
| order by FirstSeen descA governance framework documents your organisation’s policies, rules, and processes for Security Copilot usage. This is essential for audit readiness and consistent operations.
| Section | Content |
|---|---|
| 1. Approved Use Cases | Incident triage, threat hunting, report generation, KQL assistance, phishing investigation. List each approved use case with the target analyst tier. |
| 2. Prohibited Actions | Do not paste passwords, API keys, or PII into Copilot prompts. Do not use Copilot to access data outside your authorised scope. Do not share session outputs externally without approval. |
| 3. Data Handling | Copilot processes data within the Microsoft security boundary. Classify Copilot session outputs as “Internal - Confidential”. Retain session history per your data retention policy. |
| 4. Plugin Approval Process | New third-party plugin requests must be submitted to the security architecture review board. Assess data sharing, vendor security posture, and necessity before approval. |
| 5. Role Assignment Policy | Copilot Contributor: assigned to approved SOC analysts via security groups. Copilot Owner: PIM-managed with approval workflow. Quarterly access review required. |
| 6. Incident Response for Copilot Compromise | If a Copilot user account is compromised: immediately revoke sessions, disable account, review Copilot session history for data exposure, notify CISO, conduct post-incident review. |
Before declaring full deployment readiness, use this executive checklist to verify all Zero Trust controls are in place.
| Control | Status | Evidence |
|---|---|---|
| Conditional Access enforced for Copilot | โ | CA policy ID, sign-in logs showing enforcement |
| Legacy authentication blocked | โ | CA policy ID, zero legacy auth sign-ins in logs |
| Copilot Owner role managed via PIM | โ | PIM assignment screenshot, activation audit log |
| Copilot Contributor limited to security groups | โ | Role assignment export, no “All Users” assignment |
| PAW compliance policy enforced | โ | Intune compliance report for SOC devices |
| Third-party plugins reviewed and approved | โ | Plugin approval register with review dates |
| Usage monitoring operational | โ | Sentinel workbook or dashboard showing usage trends |
| Anomaly detection rules active | โ | Sentinel analytics rule IDs, test alert evidence |
| Governance framework published | โ | SharePoint URL, analyst acknowledgement records |
In this lab you:
| Resource | Description |
|---|---|
| Security Copilot experiences | Overview of standalone and embedded Security Copilot experiences across Microsoft security products |
| Apply Zero Trust to Security Copilot | Microsoft guidance on applying Zero Trust principles to Security Copilot deployment |
| Security Copilot roles and authentication | Detailed documentation on Copilot Owner and Copilot Contributor roles, permissions, and authentication |
| Conditional Access for privileged users | How to configure Conditional Access policies requiring MFA for administrative and privileged roles |
| Microsoft Entra PIM | Configure Privileged Identity Management for just-in-time, time-bound role activation with approval |
| Privileged access workstations | Microsoft guidance on deploying and securing privileged access workstations for security operations |
| Manage Security Copilot plugins | Enable, disable, and govern first-party and third-party plugins in Security Copilot |