Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
mukul975 avatar

Auditing Azure Active Directory Configuration

  • 199 installs
  • 27.3k repo stars
  • Updated August 2, 2026
  • mukul975/anthropic-cybersecurity-skills

auditing-azure-active-directory-configuration is an agent skill that structures review of Azure AD / Entra ID tenant settings for security and compliance g

About

auditing-azure-active-directory-configuration is an agent skill from the Anthropic cybersecurity skills lineage focused on reviewing Microsoft Entra ID (Azure Active Directory) tenant configuration. Solo founders shipping B2B SaaS or internal tools on Azure use it when identity is the blast radius: conditional access policies, legacy auth exposure, guest access, privileged roles, and sync misconfigurations that agents can walk through systematically instead of improvising checklists in chat. Prism lists it under Ship security as the primary shelf, with secondary use in Operate monitoring when you re-audit after org changes. Public SKILL body in the ingest was sparse (license text only), so operational steps should be validated against the full repo file before production audits. Treat outputs as guidance that still needs human verification and your change-management process.

  • Azure Active Directory / Microsoft Entra configuration audit workflow for agent-assisted review
  • Identity and access hygiene checks aligned with cybersecurity skill-pack patterns
  • Suited to pre-launch and periodic compliance sweeps on Microsoft cloud tenants
  • Pairs with Anthropic cybersecurity skills collection for enterprise-style hardening
  • Apache 2.0 licensed skill artifact from anthropic-cybersecurity-skills repo

Auditing Azure Active Directory Configuration by the numbers

  • 199 all-time installs (skills.sh)
  • +8 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #775 of 2,203 Security skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/mukul975/anthropic-cybersecurity-skills --skill auditing-azure-active-directory-configuration

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs199
repo stars27.3k
Security audit3 / 3 scanners passed
Last updatedAugust 2, 2026
Repositorymukul975/anthropic-cybersecurity-skills

What it does

Guide an agent through structured review of Microsoft Entra ID (Azure AD) settings—conditional access, identities, and risky configs—before or after production ship.

Who is it for?

Best when you're on Microsoft 365 / Entra ID and need a scripted identity audit before enterprise pilots or SOC-style questionnaires.

Skip if: Skip if you're on Auth0-only or pure custom JWT stacks with no Azure AD footprint, or organizations that require certified penetration tests instead of configuration review skills.

When should I use this skill?

User needs to audit, review, or harden Azure Active Directory / Microsoft Entra ID tenant configuration for security or compliance.

What you get

You get an agent-guided audit pass highlighting risky Azure AD configuration areas to remediate before widening user access or passing customer security reviews.

  • Structured audit findings on Entra ID configuration areas
  • Prioritized remediation notes for identity and access risks
  • Summary suitable for internal ship/security checklist

Files

SKILL.mdMarkdownGitHub ↗

Auditing Azure Active Directory Configuration

When to Use

  • When performing a security assessment of an Azure tenant's identity configuration
  • When compliance audits require review of authentication policies, MFA enforcement, and role assignments
  • When onboarding a new Azure tenant after merger or acquisition
  • When investigating suspicious sign-in activity or compromised accounts
  • When validating conditional access policies adequately protect against identity-based attacks

Do not use for on-premises Active Directory auditing (use PingCastle or BloodHound AD), for Azure resource-level RBAC auditing without identity context, or for real-time threat detection (use Microsoft Defender for Identity).

Prerequisites

  • Global Reader or Security Reader role in the target Microsoft Entra ID tenant
  • Microsoft Graph PowerShell SDK installed (Install-Module Microsoft.Graph)
  • Az CLI authenticated to the target tenant (az login --tenant TENANT_ID)
  • ScoutSuite with Azure provider configured for automated assessment
  • Access to Azure AD audit logs and sign-in logs (requires Azure AD Premium P1/P2)

Workflow

Step 1: Enumerate Tenant Configuration and Security Defaults

Assess the tenant's baseline identity security settings including security defaults and legacy authentication status.

# Connect to Microsoft Graph
Connect-MgGraph -Scopes "Directory.Read.All","Policy.Read.All","AuditLog.Read.All"

# Get tenant details
Get-MgOrganization | Select-Object DisplayName, Id, VerifiedDomains

# Check if Security Defaults are enabled
Get-MgPolicyIdentitySecurityDefaultEnforcementPolicy | Select-Object IsEnabled

# List authentication methods policies
Get-MgPolicyAuthenticationMethodPolicy | ConvertTo-Json -Depth 5

# Check legacy authentication status via Conditional Access
Get-MgIdentityConditionalAccessPolicy | Where-Object {
    $_.Conditions.ClientAppTypes -contains "exchangeActiveSync" -or
    $_.Conditions.ClientAppTypes -contains "other"
} | Select-Object DisplayName, State

Step 2: Audit Privileged Role Assignments

Review directory role assignments to identify over-privileged users, permanent admin accounts, and risky role configurations.

# List all Global Administrator assignments
az rest --method GET \
  --url "https://graph.microsoft.com/v1.0/directoryRoles/filterByIds" \
  --body '{"ids":["62e90394-69f5-4237-9190-012177145e10"]}' | \
  az rest --method GET \
  --url "https://graph.microsoft.com/v1.0/directoryRoles?filter=displayName eq 'Global Administrator'" \
  --query "value[0].id" -o tsv

# List all privileged role assignments using Graph API
az rest --method GET \
  --url "https://graph.microsoft.com/v1.0/roleManagement/directory/roleAssignments?\$expand=principal" \
  --query "value[*].{Role:roleDefinitionId, Principal:principal.displayName, PrincipalType:principal.@odata.type}" \
  -o table

# Check for users with multiple admin roles
az ad user list --query "[].{UPN:userPrincipalName, DisplayName:displayName}" -o table

# List service principals with admin role assignments
az rest --method GET \
  --url "https://graph.microsoft.com/v1.0/roleManagement/directory/roleAssignments?\$filter=principalOrganizationId eq 'TENANT_ID'" \
  -o json

Step 3: Review Conditional Access Policies

Audit conditional access policies for coverage gaps, particularly around MFA enforcement, device compliance, and location-based restrictions.

# List all Conditional Access policies
Get-MgIdentityConditionalAccessPolicy | Select-Object DisplayName, State, @{
    N='GrantControls'; E={$_.GrantControls.BuiltInControls -join ', '}
} | Format-Table -AutoSize

# Identify policies in report-only mode (not enforced)
Get-MgIdentityConditionalAccessPolicy | Where-Object {$_.State -eq "enabledForReportingButNotEnforced"} |
    Select-Object DisplayName

# Check MFA enforcement coverage
Get-MgIdentityConditionalAccessPolicy | Where-Object {
    $_.GrantControls.BuiltInControls -contains "mfa"
} | Select-Object DisplayName, State, @{
    N='Users'; E={$_.Conditions.Users.IncludeUsers -join ', '}
}

# Find policies that exclude groups (potential bypass)
Get-MgIdentityConditionalAccessPolicy | Where-Object {
    $_.Conditions.Users.ExcludeGroups.Count -gt 0
} | Select-Object DisplayName, @{
    N='ExcludedGroups'; E={$_.Conditions.Users.ExcludeGroups -join ', '}
}

Step 4: Identify Stale Accounts and Guest Users

Find accounts that have not signed in recently, disabled accounts with active role assignments, and risky guest user configurations.

# Find users who haven't signed in for 90+ days
az ad user list --query "[?signInActivity.lastSignInDateTime < '2025-11-25T00:00:00Z'].{UPN:userPrincipalName, LastSignIn:signInActivity.lastSignInDateTime, Enabled:accountEnabled}" -o table

# List all guest users
az ad user list --filter "userType eq 'Guest'" \
  --query "[].{UPN:userPrincipalName, DisplayName:displayName, CreatedDate:createdDateTime}" \
  -o table

# Find guest users with privileged roles
az rest --method GET \
  --url "https://graph.microsoft.com/v1.0/roleManagement/directory/roleAssignments?\$expand=principal" \
  --query "value[?principal.userType=='Guest'].{Role:roleDefinitionId,Guest:principal.userPrincipalName}" \
  -o table

# Check for accounts with disabled MFA
az rest --method GET \
  --url "https://graph.microsoft.com/v1.0/reports/authenticationMethods/userRegistrationDetails" \
  --query "value[?!isMfaRegistered].{UPN:userPrincipalName,MfaRegistered:isMfaRegistered}" \
  -o table

Step 5: Analyze Sign-In Logs for Risky Activity

Review sign-in logs to identify anomalous authentication patterns, failed MFA challenges, and risky sign-in detections.

# Get risky sign-ins from last 7 days
az rest --method GET \
  --url "https://graph.microsoft.com/v1.0/auditLogs/signIns?\$filter=riskLevelDuringSignIn ne 'none' and createdDateTime ge 2026-02-16T00:00:00Z" \
  --query "value[*].{User:userPrincipalName,Risk:riskLevelDuringSignIn,IP:ipAddress,App:appDisplayName,Status:status.errorCode}" \
  -o table

# Get sign-ins from unfamiliar locations
az rest --method GET \
  --url "https://graph.microsoft.com/v1.0/auditLogs/signIns?\$filter=riskEventTypes_v2/any(r:r eq 'unfamiliarFeatures')" \
  --query "value[*].{User:userPrincipalName,Location:location.city,IP:ipAddress}" \
  -o table

# Check for legacy authentication sign-ins
az rest --method GET \
  --url "https://graph.microsoft.com/v1.0/auditLogs/signIns?\$filter=clientAppUsed ne 'Browser' and clientAppUsed ne 'Mobile Apps and Desktop clients'" \
  --query "value[*].{User:userPrincipalName,ClientApp:clientAppUsed,Status:status.errorCode}" \
  -o table

Step 6: Run ScoutSuite Automated Assessment

Execute ScoutSuite for comprehensive automated checks across the Azure tenant configuration.

# Run ScoutSuite against Azure
python3 -m ScoutSuite azure --cli \
  --report-dir ./scoutsuite-azure-report \
  --all-subscriptions

# Review the generated HTML report
open ./scoutsuite-azure-report/azure-report.html

Key Concepts

TermDefinition
Microsoft Entra IDMicrosoft's cloud identity and access management service, formerly Azure Active Directory, providing authentication and authorization
Conditional AccessPolicy engine that evaluates signals (user, device, location, risk) to enforce access controls like MFA, device compliance, or block access
Security DefaultsMicrosoft's baseline identity protection settings that enforce MFA registration, block legacy auth, and protect privileged actions
Privileged Identity ManagementAzure AD Premium P2 feature enabling just-in-time privileged access with approval workflows and time-bound role activation
Legacy AuthenticationOlder authentication protocols (POP3, IMAP, SMTP, ActiveSync) that do not support MFA and are commonly exploited for credential attacks
Risky Sign-InMicrosoft Entra Identity Protection detection of sign-in anomalies including impossible travel, unfamiliar locations, and malware-linked IPs

Tools & Systems

  • Microsoft Graph API: Primary programmatic interface for querying Entra ID configuration, policies, roles, and audit logs
  • Microsoft Graph PowerShell SDK: PowerShell module for Entra ID management and security auditing tasks
  • ScoutSuite: Multi-cloud auditing tool with Azure provider support for IAM, storage, networking, and identity checks
  • AzureADRecon: Community tool for comprehensive Azure AD reconnaissance and security assessment reporting
  • Microsoft Defender for Identity: Cloud-based security solution for detecting identity-based threats and compromised credentials

Common Scenarios

Scenario: Post-Acquisition Azure Tenant Security Assessment

Context: After acquiring a company, the security team needs to assess the Azure tenant identity posture before integrating it with the corporate Entra ID.

Approach: 1. Enumerate all Global Administrators and check for personal accounts in admin roles 2. Review conditional access policies to verify MFA is enforced for all users, not just admins 3. Identify guest users with privileged access that may indicate third-party vendor over-permissioning 4. Check for stale accounts (no sign-in for 90+ days) that could be targets for credential attacks 5. Review sign-in logs for legacy authentication usage that bypasses MFA 6. Verify Security Defaults or equivalent CA policies block legacy auth protocols 7. Produce a risk report with prioritized remediation steps before tenant integration

Pitfalls: Azure AD Premium P2 is required for risky sign-in detections and PIM. If the acquired tenant uses a lower license tier, many identity protection features will be unavailable. Guest users from partner tenants may have implicit access through dynamic groups that are not visible in standard role assignment queries.

Output Format

Azure Active Directory Security Audit Report
===============================================
Tenant: acme-acquired.onmicrosoft.com
Tenant ID: a1b2c3d4-e5f6-7890-abcd-ef1234567890
Audit Date: 2026-02-23
License: Azure AD Premium P2

IDENTITY CONFIGURATION:
  Security Defaults: Disabled (Conditional Access in use)
  Conditional Access Policies: 12 (8 enforced, 3 report-only, 1 disabled)
  Legacy Auth Blocked: Partial (blocked for admins only)

PRIVILEGED ACCESS:
  Global Administrators:              8 (recommended: <= 4)
  Permanent admin assignments:        6 (no PIM activation required)
  Service principals with admin:      3
  Guest users with privileged roles:  2

ACCOUNT HYGIENE:
  Total users:                        1,247
  Stale accounts (90+ days):          89
  Guest users:                        234
  Users without MFA registered:       156

SIGN-IN RISK:
  Risky sign-ins (last 30 days):      34
  Legacy auth sign-ins (last 7 days): 67
  Impossible travel detections:        5
  Unfamiliar location sign-ins:       12

CRITICAL FINDINGS:
  1. 8 Global Administrators with permanent assignments (use PIM)
  2. Legacy authentication not blocked for non-admin users
  3. 156 users without MFA registration
  4. 2 guest users with Privileged Role Administrator role

Related skills

How it compares

Configuration audit skill for Entra ID—not a replacement for Microsoft Defender portal automation or full purple-team exercises.

FAQ

Who is auditing-azure-active-directory-configuration for?

SaaS founders and small ops leads managing Azure / Entra tenants who want agent-assisted identity configuration reviews.

When should I use auditing-azure-active-directory-configuration?

In Ship security before go-live with SSO customers; in Operate monitoring after role or CA policy changes; when prepping answers for vendor security assessments on Microsoft identity.

Is auditing-azure-active-directory-configuration safe to install?

Expect network and cloud API access for tenant inspection; review the Security Audits panel on this Prism page and restrict agent credentials to least-privilege audit roles.

Securityauditcompliance

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.