Reusable, read-only Microsoft Security Copilot promptbooks for evidence-driven Microsoft Entra monitoring, triage, and validation.
These promptbooks are designed as two complementary workflows:
Application Change Monitor
|
v
Application Risk Validator
Privileged Access Change Monitor
|
v
Privileged Identity Validator
The monitors identify new or noteworthy objects and provide deterministic identifiers. The validators investigate a selected application or privileged identity in greater depth. All four workflows are read-only and require analyst review before remediation or containment.
Security-Copilot-Promptbooks/
|-- Entra-Application-Change-Monitor-v1.3.txt
|-- Entra-Application-Risk-Validator-v4.0.txt
|-- Entra-Privileged-Access-Change-Monitor-v1.2.txt
|-- Entra-Privileged-Identity-Validator-v4.1.txt
`-- README.md
The PowerShell companions are maintained separately in rolling-code/PowerShell-Scripts. They provide deterministic evidence that can validate or expand Security Copilot findings. They do not necessarily reproduce every Security Copilot data source.
Entra-Application-Change-Monitor-v1.3.txt
-> list_all_applications2.ps1
-> Profile-App.ps1
-> BulkMultiPermExploitability2.ps1
-> Audit-AppDelegationRisks.ps1
Entra-Application-Risk-Validator-v4.0.txt
-> Profile-App.ps1
-> Audit-AppDelegationRisks.ps1
-> BulkMultiPermExploitability2.ps1
Entra-Privileged-Access-Change-Monitor-v1.2.txt
-> Audit-AllUsersRolePerms.ps1
-> enum_entra_admins.ps1
Entra-Privileged-Identity-Validator-v4.1.txt
-> Audit-AllUsersRolePerms.ps1
-> get_policies.ps1
-> find_disabled_accounts.ps1
Performs a time-bounded discovery review of Microsoft Entra application registrations and service principals. It retrieves newly created objects, completes available pagination, pairs application registrations and service principals by exact Application ID, reconciles object and logical-identity counts, and selects unique candidates for deeper validation.
What it does:
- Reviews application registrations and service principals created during
<LookbackDays>. - Pairs related objects using the Application ID, never the display name.
- Distinguishes directory-object counts from logical application identities.
- Avoids treating new, unmatched, unverified, unusually named, single-tenant, managed, or workload identities as vulnerabilities by themselves.
- Produces candidate blocks containing Application ID and object IDs for the downstream risk validator.
- Does not inspect credentials, permissions, consent, owners, redirect URIs, roles, business purpose, or sign-in activity.
How to use it:
- Create or edit a Security Copilot promptbook.
- Paste the complete prompt from
Entra-Application-Change-Monitor-v1.3.txt. - Verify that
LookbackDaysappears under Inputs you'll need. - Run the promptbook with a positive whole-number lookback period.
- Copy candidate Application IDs and service-principal Object IDs into Entra Application Risk Validator.
PowerShell validation:
list_all_applications2.ps1creates a deterministic inventory of application registrations and enterprise application service principals.Profile-App.ps1creates a detailed governance profile for one Application ID.BulkMultiPermExploitability2.ps1reviews granted high-impact application and delegated permissions across an inventory.Audit-AppDelegationRisks.ps1performs a focused delegated-consent review for a selected application.
Performs a detailed, manually initiated validation of one Microsoft Entra application identity. It uses the Application ID as the primary resolution key and can optionally validate an exact tenant-local service-principal Object ID.
Inputs:
- Required:
<ApplicationId> - Optional:
<ServicePrincipalObjectId>; useUnknownwhen unavailable - Required:
<LookbackDays>
What it reviews when supported:
- Application registration and service-principal resolution
- Ownership and business-purpose evidence
- Secret, certificate, and federated credential metadata
- Delegated and application permissions
- OAuth consent grants and app-role assignments
- Microsoft Entra and Azure role assignments
- Redirect URIs and application configuration
- Audit events and service-principal activity
- Evidence completeness, DevOps-story criteria, and immediate-investigation criteria
How to use it:
- Supply the Application ID from the Change Monitor or another authoritative inventory.
- Supply the exact service-principal Object ID when available, otherwise enter
Unknown. - Select a positive whole-number lookback period.
- Review collection status before accepting the final decision.
- Validate important findings with the linked PowerShell scripts before remediation.
PowerShell validation:
Profile-App.ps1is the primary deterministic companion.Audit-AppDelegationRisks.ps1validates delegated grants, tenant-wide consent, privileged scopes, and assignments.BulkMultiPermExploitability2.ps1compares application permissions against a configurable high-risk catalog.
Creates an exportable inventory of Microsoft Entra privileged-role assignments and provides the tenant-local Identity Object IDs required by the downstream Privileged Identity Validator.
What it does:
- Retrieves user, guest, group, service-principal, managed-identity, direct, group-based, and PIM assignments when supported.
- Preserves Identity Object IDs, Role Definition IDs, assignment states, and assignment sources.
- Requires inventory-row and unique-identity reconciliation.
- Marks collection Partial when pagination, output limits, missing Object IDs, or count reconciliation prevent a complete baseline.
- Does not approve a new baseline from a Partial inventory.
- Produces a Validator Handoff with Object ID and suggested lookback period.
How to use it:
- Run the promptbook without modification in a Security Copilot session that has the required Entra access.
- Export the inventory when needed.
- Treat returned rows as evidence, and verify that narrative counts reconcile with the export.
- Copy an Identity Object ID from Validator Handoff into Entra Privileged Identity Validator.
- Do not treat
Not DetectedasConfirmed Absentwhen collection is Partial.
PowerShell validation:
Audit-AllUsersRolePerms.ps1provides tenant-wide deterministic evidence for directory roles, Azure RBAC, role-assignable groups, and effective privilege paths.enum_entra_admins.ps1is a secondary discovery helper for administrator-like groups and nested membership. Name matching is a lead, not proof of privilege.
Validates one exact privileged Microsoft Entra directory object by tenant-local Object ID. It adapts its review to a member user, guest, group, service principal, or managed identity and returns a calibrated Yes, No, or Inconclusive answer to Should We Care?
Inputs:
- Required:
<IdentityObjectId> - Required:
<LookbackDays>
What it reviews when supported:
- Exact identity resolution
- Direct, group-based, PIM, permanent, time-bound, and Azure role assignments
- Identity-type-specific ownership, purpose, and governance context
- Bounded direct membership for privileged groups
- User authentication, MFA, passwordless indicators, Conditional Access, and risk context
- Workload credentials and activity for service principals and managed identities
- Sign-ins and audit events
- Evidence completeness, severity calibration, DevOps criteria, and incident criteria
Decision behavior:
Nomeans no confirmed governance or technical deficiency and no compromise indicator; routine recertification may still apply.Yesrequires a specific supported governance concern, technical deficiency, compromise indicator, or clearly defined validation requirement.Inconclusivemeans missing evidence prevents a dependable decision.
PowerShell validation:
Audit-AllUsersRolePerms.ps1validates directory-role and Azure RBAC privilege paths.get_policies.ps1validates Conditional Access targeting for a user, including direct and transitive membership context.find_disabled_accounts.ps1validates whether exported users resolve as enabled, disabled, unresolved, or failed.
- Start from a Security Copilot session containing the prompt you want to reuse.
- Select the prompt and choose Create promptbook.
- Provide a name, tags, and description.
- Paste the complete prompt text.
- Preserve placeholders in angle brackets with no spaces, such as
<LookbackDays>. - Verify every placeholder under Inputs you'll need before saving.
- Save and test the promptbook in a new session.
Parameter text inside the prompt is not enough if the builder does not list the input. Always verify the builder's detected inputs before running the promptbook.
- Scanner or AI output is a lead, not final proof.
- Validate important findings using Microsoft Graph, PowerShell, logs, portals, exports, or direct access testing.
- Missing evidence is not proof of safety and is not proof of risk.
Not Detecteddoes not meanConfirmed Absent.- Promptbook output varies with the executing user's Security Copilot role, Entra RBAC, available plugins, retention, and data permissions.
- These promptbooks do not modify tenant configuration or perform remediation.
Each file includes a visible workflow version that must match its filename. Increment the version whenever prompt behavior or decision logic changes. Publish the complete updated promptbook rather than a patch.
Issues and pull requests are welcome. Contributions should:
- Remain organization-neutral and contain no tenant-specific identifiers or secrets.
- Preserve read-only behavior unless a separate, clearly labeled workflow is proposed.
- Include evidence limitations and deterministic validation guidance.
- Keep input placeholders and visible versions synchronized with filenames.
- Avoid unsupported severity, exploitability, or remediation claims.
Use these promptbooks only in environments where you are authorized to perform security monitoring and validation. Review all generated conclusions and commands before use. Microsoft Security Copilot output may vary according to permissions, available data, plugins, retention, and model behavior.