[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ADVWP9H31AFDBHTJCMJWXV":3,"skill-same:01M6ADVWP9H31AFDBHTJCMJWXV":103},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":42,"linkOnly":43,"markdownContent":44,"markdownBody":45,"frontMatter":46,"refName":62,"commitSha":63,"skillDirectory":64,"forksCount":65,"repositoryHtmlUrl":66,"repositoryHomepageUrl":67,"ownerHtmlUrl":68,"ownerBlogUrl":69,"ownerDescription":70,"updatedAt":71,"install":72,"resources":85},"01M6ADVWP9H31AFDBHTJCMJWXV","auditing-azure-active-directory-configuration",null,"Auditing Microsoft Entra ID (Azure Active Directory) configuration to identify risky authentication policies, overly permissive role assignments, stale accounts, conditional access gaps, and guest user risks using AzureAD PowerShell, Microsoft Graph API, and ScoutSuite.","mukul975\u002FAnthropic-Cybersecurity-Skills","mukul975","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F42860185?v=4","01M6ADEQR8T5M4EEG6C67BQCWF","Mahipal","01M6ADJPMYWG1E5GM1FWBE3128",36078,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fauditing-azure-active-directory-configuration\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41],"auditing azure active directory configuration","azure","directory","audit","conditional-access","iam-audit","entra-id","powershell","cloud-security","active-directory","cloud","graph","authentication","pr","entra id","microsoft","cybersecurity","security","2026-11-10 10:12:30",false,"---\nname: auditing-azure-active-directory-configuration\ndescription: 'Auditing Microsoft Entra ID (Azure Active Directory) configuration to\n  identify risky authentication policies, overly permissive role assignments, stale\n  accounts, conditional access gaps, and guest user risks using AzureAD PowerShell,\n  Microsoft Graph API, and ScoutSuite.\n\n  '\ndomain: cybersecurity\nsubdomain: cloud-security\ntags:\n- cloud-security\n- azure\n- entra-id\n- active-directory\n- iam-audit\n- conditional-access\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- PR.IR-01\n- ID.AM-08\n- GV.SC-06\n- DE.CM-01\nmitre_attack:\n- T1078.004\n- T1098.003\n- T1556.006\n- T1069.003\n- T1526\n---\n\n# Auditing Azure Active Directory Configuration\n\n## When to Use\n\n- When performing a security assessment of an Azure tenant's identity configuration\n- When compliance audits require review of authentication policies, MFA enforcement, and role assignments\n- When onboarding a new Azure tenant after merger or acquisition\n- When investigating suspicious sign-in activity or compromised accounts\n- When validating conditional access policies adequately protect against identity-based attacks\n\n**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).\n\n## Prerequisites\n\n- Global Reader or Security Reader role in the target Microsoft Entra ID tenant\n- Microsoft Graph PowerShell SDK installed (`Install-Module Microsoft.Graph`)\n- Az CLI authenticated to the target tenant (`az login --tenant TENANT_ID`)\n- ScoutSuite with Azure provider configured for automated assessment\n- Access to Azure AD audit logs and sign-in logs (requires Azure AD Premium P1\u002FP2)\n\n## Workflow\n\n### Step 1: Enumerate Tenant Configuration and Security Defaults\n\nAssess the tenant's baseline identity security settings including security defaults and legacy authentication status.\n\n```powershell\n# Connect to Microsoft Graph\nConnect-MgGraph -Scopes \"Directory.Read.All\",\"Policy.Read.All\",\"AuditLog.Read.All\"\n\n# Get tenant details\nGet-MgOrganization | Select-Object DisplayName, Id, VerifiedDomains\n\n# Check if Security Defaults are enabled\nGet-MgPolicyIdentitySecurityDefaultEnforcementPolicy | Select-Object IsEnabled\n\n# List authentication methods policies\nGet-MgPolicyAuthenticationMethodPolicy | ConvertTo-Json -Depth 5\n\n# Check legacy authentication status via Conditional Access\nGet-MgIdentityConditionalAccessPolicy | Where-Object {\n    $_.Conditions.ClientAppTypes -contains \"exchangeActiveSync\" -or\n    $_.Conditions.ClientAppTypes -contains \"other\"\n} | Select-Object DisplayName, State\n```\n\n### Step 2: Audit Privileged Role Assignments\n\nReview directory role assignments to identify over-privileged users, permanent admin accounts, and risky role configurations.\n\n```bash\n# List all Global Administrator assignments\naz rest --method GET \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002FdirectoryRoles\u002FfilterByIds\" \\\n  --body '{\"ids\":[\"62e90394-69f5-4237-9190-012177145e10\"]}' | \\\n  az rest --method GET \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002FdirectoryRoles?filter=displayName eq 'Global Administrator'\" \\\n  --query \"value[0].id\" -o tsv\n\n# List all privileged role assignments using Graph API\naz rest --method GET \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002FroleManagement\u002Fdirectory\u002FroleAssignments?\\$expand=principal\" \\\n  --query \"value[*].{Role:roleDefinitionId, Principal:principal.displayName, PrincipalType:principal.@odata.type}\" \\\n  -o table\n\n# Check for users with multiple admin roles\naz ad user list --query \"[].{UPN:userPrincipalName, DisplayName:displayName}\" -o table\n\n# List service principals with admin role assignments\naz rest --method GET \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002FroleManagement\u002Fdirectory\u002FroleAssignments?\\$filter=principalOrganizationId eq 'TENANT_ID'\" \\\n  -o json\n```\n\n### Step 3: Review Conditional Access Policies\n\nAudit conditional access policies for coverage gaps, particularly around MFA enforcement, device compliance, and location-based restrictions.\n\n```powershell\n# List all Conditional Access policies\nGet-MgIdentityConditionalAccessPolicy | Select-Object DisplayName, State, @{\n    N='GrantControls'; E={$_.GrantControls.BuiltInControls -join ', '}\n} | Format-Table -AutoSize\n\n# Identify policies in report-only mode (not enforced)\nGet-MgIdentityConditionalAccessPolicy | Where-Object {$_.State -eq \"enabledForReportingButNotEnforced\"} |\n    Select-Object DisplayName\n\n# Check MFA enforcement coverage\nGet-MgIdentityConditionalAccessPolicy | Where-Object {\n    $_.GrantControls.BuiltInControls -contains \"mfa\"\n} | Select-Object DisplayName, State, @{\n    N='Users'; E={$_.Conditions.Users.IncludeUsers -join ', '}\n}\n\n# Find policies that exclude groups (potential bypass)\nGet-MgIdentityConditionalAccessPolicy | Where-Object {\n    $_.Conditions.Users.ExcludeGroups.Count -gt 0\n} | Select-Object DisplayName, @{\n    N='ExcludedGroups'; E={$_.Conditions.Users.ExcludeGroups -join ', '}\n}\n```\n\n### Step 4: Identify Stale Accounts and Guest Users\n\nFind accounts that have not signed in recently, disabled accounts with active role assignments, and risky guest user configurations.\n\n```bash\n# Find users who haven't signed in for 90+ days\naz ad user list --query \"[?signInActivity.lastSignInDateTime \u003C '2025-11-25T00:00:00Z'].{UPN:userPrincipalName, LastSignIn:signInActivity.lastSignInDateTime, Enabled:accountEnabled}\" -o table\n\n# List all guest users\naz ad user list --filter \"userType eq 'Guest'\" \\\n  --query \"[].{UPN:userPrincipalName, DisplayName:displayName, CreatedDate:createdDateTime}\" \\\n  -o table\n\n# Find guest users with privileged roles\naz rest --method GET \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002FroleManagement\u002Fdirectory\u002FroleAssignments?\\$expand=principal\" \\\n  --query \"value[?principal.userType=='Guest'].{Role:roleDefinitionId,Guest:principal.userPrincipalName}\" \\\n  -o table\n\n# Check for accounts with disabled MFA\naz rest --method GET \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002Freports\u002FauthenticationMethods\u002FuserRegistrationDetails\" \\\n  --query \"value[?!isMfaRegistered].{UPN:userPrincipalName,MfaRegistered:isMfaRegistered}\" \\\n  -o table\n```\n\n### Step 5: Analyze Sign-In Logs for Risky Activity\n\nReview sign-in logs to identify anomalous authentication patterns, failed MFA challenges, and risky sign-in detections.\n\n```bash\n# Get risky sign-ins from last 7 days\naz rest --method GET \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002FauditLogs\u002FsignIns?\\$filter=riskLevelDuringSignIn ne 'none' and createdDateTime ge 2026-02-16T00:00:00Z\" \\\n  --query \"value[*].{User:userPrincipalName,Risk:riskLevelDuringSignIn,IP:ipAddress,App:appDisplayName,Status:status.errorCode}\" \\\n  -o table\n\n# Get sign-ins from unfamiliar locations\naz rest --method GET \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002FauditLogs\u002FsignIns?\\$filter=riskEventTypes_v2\u002Fany(r:r eq 'unfamiliarFeatures')\" \\\n  --query \"value[*].{User:userPrincipalName,Location:location.city,IP:ipAddress}\" \\\n  -o table\n\n# Check for legacy authentication sign-ins\naz rest --method GET \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002FauditLogs\u002FsignIns?\\$filter=clientAppUsed ne 'Browser' and clientAppUsed ne 'Mobile Apps and Desktop clients'\" \\\n  --query \"value[*].{User:userPrincipalName,ClientApp:clientAppUsed,Status:status.errorCode}\" \\\n  -o table\n```\n\n### Step 6: Run ScoutSuite Automated Assessment\n\nExecute ScoutSuite for comprehensive automated checks across the Azure tenant configuration.\n\n```bash\n# Run ScoutSuite against Azure\npython3 -m ScoutSuite azure --cli \\\n  --report-dir .\u002Fscoutsuite-azure-report \\\n  --all-subscriptions\n\n# Review the generated HTML report\nopen .\u002Fscoutsuite-azure-report\u002Fazure-report.html\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| Microsoft Entra ID | Microsoft's cloud identity and access management service, formerly Azure Active Directory, providing authentication and authorization |\n| Conditional Access | Policy engine that evaluates signals (user, device, location, risk) to enforce access controls like MFA, device compliance, or block access |\n| Security Defaults | Microsoft's baseline identity protection settings that enforce MFA registration, block legacy auth, and protect privileged actions |\n| Privileged Identity Management | Azure AD Premium P2 feature enabling just-in-time privileged access with approval workflows and time-bound role activation |\n| Legacy Authentication | Older authentication protocols (POP3, IMAP, SMTP, ActiveSync) that do not support MFA and are commonly exploited for credential attacks |\n| Risky Sign-In | Microsoft Entra Identity Protection detection of sign-in anomalies including impossible travel, unfamiliar locations, and malware-linked IPs |\n\n## Tools & Systems\n\n- **Microsoft Graph API**: Primary programmatic interface for querying Entra ID configuration, policies, roles, and audit logs\n- **Microsoft Graph PowerShell SDK**: PowerShell module for Entra ID management and security auditing tasks\n- **ScoutSuite**: Multi-cloud auditing tool with Azure provider support for IAM, storage, networking, and identity checks\n- **AzureADRecon**: Community tool for comprehensive Azure AD reconnaissance and security assessment reporting\n- **Microsoft Defender for Identity**: Cloud-based security solution for detecting identity-based threats and compromised credentials\n\n## Common Scenarios\n\n### Scenario: Post-Acquisition Azure Tenant Security Assessment\n\n**Context**: After acquiring a company, the security team needs to assess the Azure tenant identity posture before integrating it with the corporate Entra ID.\n\n**Approach**:\n1. Enumerate all Global Administrators and check for personal accounts in admin roles\n2. Review conditional access policies to verify MFA is enforced for all users, not just admins\n3. Identify guest users with privileged access that may indicate third-party vendor over-permissioning\n4. Check for stale accounts (no sign-in for 90+ days) that could be targets for credential attacks\n5. Review sign-in logs for legacy authentication usage that bypasses MFA\n6. Verify Security Defaults or equivalent CA policies block legacy auth protocols\n7. Produce a risk report with prioritized remediation steps before tenant integration\n\n**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.\n\n## Output Format\n\n```\nAzure Active Directory Security Audit Report\n===============================================\nTenant: acme-acquired.onmicrosoft.com\nTenant ID: a1b2c3d4-e5f6-7890-abcd-ef1234567890\nAudit Date: 2026-02-23\nLicense: Azure AD Premium P2\n\nIDENTITY CONFIGURATION:\n  Security Defaults: Disabled (Conditional Access in use)\n  Conditional Access Policies: 12 (8 enforced, 3 report-only, 1 disabled)\n  Legacy Auth Blocked: Partial (blocked for admins only)\n\nPRIVILEGED ACCESS:\n  Global Administrators:              8 (recommended: \u003C= 4)\n  Permanent admin assignments:        6 (no PIM activation required)\n  Service principals with admin:      3\n  Guest users with privileged roles:  2\n\nACCOUNT HYGIENE:\n  Total users:                        1,247\n  Stale accounts (90+ days):          89\n  Guest users:                        234\n  Users without MFA registered:       156\n\nSIGN-IN RISK:\n  Risky sign-ins (last 30 days):      34\n  Legacy auth sign-ins (last 7 days): 67\n  Impossible travel detections:        5\n  Unfamiliar location sign-ins:       12\n\nCRITICAL FINDINGS:\n  1. 8 Global Administrators with permanent assignments (use PIM)\n  2. Legacy authentication not blocked for non-admin users\n  3. 156 users without MFA registration\n  4. 2 guest users with Privileged Role Administrator role\n```\n","# Auditing Azure Active Directory Configuration\n\n## When to Use\n\n- When performing a security assessment of an Azure tenant's identity configuration\n- When compliance audits require review of authentication policies, MFA enforcement, and role assignments\n- When onboarding a new Azure tenant after merger or acquisition\n- When investigating suspicious sign-in activity or compromised accounts\n- When validating conditional access policies adequately protect against identity-based attacks\n\n**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).\n\n## Prerequisites\n\n- Global Reader or Security Reader role in the target Microsoft Entra ID tenant\n- Microsoft Graph PowerShell SDK installed (`Install-Module Microsoft.Graph`)\n- Az CLI authenticated to the target tenant (`az login --tenant TENANT_ID`)\n- ScoutSuite with Azure provider configured for automated assessment\n- Access to Azure AD audit logs and sign-in logs (requires Azure AD Premium P1\u002FP2)\n\n## Workflow\n\n### Step 1: Enumerate Tenant Configuration and Security Defaults\n\nAssess the tenant's baseline identity security settings including security defaults and legacy authentication status.\n\n```powershell\n# Connect to Microsoft Graph\nConnect-MgGraph -Scopes \"Directory.Read.All\",\"Policy.Read.All\",\"AuditLog.Read.All\"\n\n# Get tenant details\nGet-MgOrganization | Select-Object DisplayName, Id, VerifiedDomains\n\n# Check if Security Defaults are enabled\nGet-MgPolicyIdentitySecurityDefaultEnforcementPolicy | Select-Object IsEnabled\n\n# List authentication methods policies\nGet-MgPolicyAuthenticationMethodPolicy | ConvertTo-Json -Depth 5\n\n# Check legacy authentication status via Conditional Access\nGet-MgIdentityConditionalAccessPolicy | Where-Object {\n    $_.Conditions.ClientAppTypes -contains \"exchangeActiveSync\" -or\n    $_.Conditions.ClientAppTypes -contains \"other\"\n} | Select-Object DisplayName, State\n```\n\n### Step 2: Audit Privileged Role Assignments\n\nReview directory role assignments to identify over-privileged users, permanent admin accounts, and risky role configurations.\n\n```bash\n# List all Global Administrator assignments\naz rest --method GET \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002FdirectoryRoles\u002FfilterByIds\" \\\n  --body '{\"ids\":[\"62e90394-69f5-4237-9190-012177145e10\"]}' | \\\n  az rest --method GET \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002FdirectoryRoles?filter=displayName eq 'Global Administrator'\" \\\n  --query \"value[0].id\" -o tsv\n\n# List all privileged role assignments using Graph API\naz rest --method GET \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002FroleManagement\u002Fdirectory\u002FroleAssignments?\\$expand=principal\" \\\n  --query \"value[*].{Role:roleDefinitionId, Principal:principal.displayName, PrincipalType:principal.@odata.type}\" \\\n  -o table\n\n# Check for users with multiple admin roles\naz ad user list --query \"[].{UPN:userPrincipalName, DisplayName:displayName}\" -o table\n\n# List service principals with admin role assignments\naz rest --method GET \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002FroleManagement\u002Fdirectory\u002FroleAssignments?\\$filter=principalOrganizationId eq 'TENANT_ID'\" \\\n  -o json\n```\n\n### Step 3: Review Conditional Access Policies\n\nAudit conditional access policies for coverage gaps, particularly around MFA enforcement, device compliance, and location-based restrictions.\n\n```powershell\n# List all Conditional Access policies\nGet-MgIdentityConditionalAccessPolicy | Select-Object DisplayName, State, @{\n    N='GrantControls'; E={$_.GrantControls.BuiltInControls -join ', '}\n} | Format-Table -AutoSize\n\n# Identify policies in report-only mode (not enforced)\nGet-MgIdentityConditionalAccessPolicy | Where-Object {$_.State -eq \"enabledForReportingButNotEnforced\"} |\n    Select-Object DisplayName\n\n# Check MFA enforcement coverage\nGet-MgIdentityConditionalAccessPolicy | Where-Object {\n    $_.GrantControls.BuiltInControls -contains \"mfa\"\n} | Select-Object DisplayName, State, @{\n    N='Users'; E={$_.Conditions.Users.IncludeUsers -join ', '}\n}\n\n# Find policies that exclude groups (potential bypass)\nGet-MgIdentityConditionalAccessPolicy | Where-Object {\n    $_.Conditions.Users.ExcludeGroups.Count -gt 0\n} | Select-Object DisplayName, @{\n    N='ExcludedGroups'; E={$_.Conditions.Users.ExcludeGroups -join ', '}\n}\n```\n\n### Step 4: Identify Stale Accounts and Guest Users\n\nFind accounts that have not signed in recently, disabled accounts with active role assignments, and risky guest user configurations.\n\n```bash\n# Find users who haven't signed in for 90+ days\naz ad user list --query \"[?signInActivity.lastSignInDateTime \u003C '2025-11-25T00:00:00Z'].{UPN:userPrincipalName, LastSignIn:signInActivity.lastSignInDateTime, Enabled:accountEnabled}\" -o table\n\n# List all guest users\naz ad user list --filter \"userType eq 'Guest'\" \\\n  --query \"[].{UPN:userPrincipalName, DisplayName:displayName, CreatedDate:createdDateTime}\" \\\n  -o table\n\n# Find guest users with privileged roles\naz rest --method GET \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002FroleManagement\u002Fdirectory\u002FroleAssignments?\\$expand=principal\" \\\n  --query \"value[?principal.userType=='Guest'].{Role:roleDefinitionId,Guest:principal.userPrincipalName}\" \\\n  -o table\n\n# Check for accounts with disabled MFA\naz rest --method GET \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002Freports\u002FauthenticationMethods\u002FuserRegistrationDetails\" \\\n  --query \"value[?!isMfaRegistered].{UPN:userPrincipalName,MfaRegistered:isMfaRegistered}\" \\\n  -o table\n```\n\n### Step 5: Analyze Sign-In Logs for Risky Activity\n\nReview sign-in logs to identify anomalous authentication patterns, failed MFA challenges, and risky sign-in detections.\n\n```bash\n# Get risky sign-ins from last 7 days\naz rest --method GET \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002FauditLogs\u002FsignIns?\\$filter=riskLevelDuringSignIn ne 'none' and createdDateTime ge 2026-02-16T00:00:00Z\" \\\n  --query \"value[*].{User:userPrincipalName,Risk:riskLevelDuringSignIn,IP:ipAddress,App:appDisplayName,Status:status.errorCode}\" \\\n  -o table\n\n# Get sign-ins from unfamiliar locations\naz rest --method GET \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002FauditLogs\u002FsignIns?\\$filter=riskEventTypes_v2\u002Fany(r:r eq 'unfamiliarFeatures')\" \\\n  --query \"value[*].{User:userPrincipalName,Location:location.city,IP:ipAddress}\" \\\n  -o table\n\n# Check for legacy authentication sign-ins\naz rest --method GET \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002FauditLogs\u002FsignIns?\\$filter=clientAppUsed ne 'Browser' and clientAppUsed ne 'Mobile Apps and Desktop clients'\" \\\n  --query \"value[*].{User:userPrincipalName,ClientApp:clientAppUsed,Status:status.errorCode}\" \\\n  -o table\n```\n\n### Step 6: Run ScoutSuite Automated Assessment\n\nExecute ScoutSuite for comprehensive automated checks across the Azure tenant configuration.\n\n```bash\n# Run ScoutSuite against Azure\npython3 -m ScoutSuite azure --cli \\\n  --report-dir .\u002Fscoutsuite-azure-report \\\n  --all-subscriptions\n\n# Review the generated HTML report\nopen .\u002Fscoutsuite-azure-report\u002Fazure-report.html\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| Microsoft Entra ID | Microsoft's cloud identity and access management service, formerly Azure Active Directory, providing authentication and authorization |\n| Conditional Access | Policy engine that evaluates signals (user, device, location, risk) to enforce access controls like MFA, device compliance, or block access |\n| Security Defaults | Microsoft's baseline identity protection settings that enforce MFA registration, block legacy auth, and protect privileged actions |\n| Privileged Identity Management | Azure AD Premium P2 feature enabling just-in-time privileged access with approval workflows and time-bound role activation |\n| Legacy Authentication | Older authentication protocols (POP3, IMAP, SMTP, ActiveSync) that do not support MFA and are commonly exploited for credential attacks |\n| Risky Sign-In | Microsoft Entra Identity Protection detection of sign-in anomalies including impossible travel, unfamiliar locations, and malware-linked IPs |\n\n## Tools & Systems\n\n- **Microsoft Graph API**: Primary programmatic interface for querying Entra ID configuration, policies, roles, and audit logs\n- **Microsoft Graph PowerShell SDK**: PowerShell module for Entra ID management and security auditing tasks\n- **ScoutSuite**: Multi-cloud auditing tool with Azure provider support for IAM, storage, networking, and identity checks\n- **AzureADRecon**: Community tool for comprehensive Azure AD reconnaissance and security assessment reporting\n- **Microsoft Defender for Identity**: Cloud-based security solution for detecting identity-based threats and compromised credentials\n\n## Common Scenarios\n\n### Scenario: Post-Acquisition Azure Tenant Security Assessment\n\n**Context**: After acquiring a company, the security team needs to assess the Azure tenant identity posture before integrating it with the corporate Entra ID.\n\n**Approach**:\n1. Enumerate all Global Administrators and check for personal accounts in admin roles\n2. Review conditional access policies to verify MFA is enforced for all users, not just admins\n3. Identify guest users with privileged access that may indicate third-party vendor over-permissioning\n4. Check for stale accounts (no sign-in for 90+ days) that could be targets for credential attacks\n5. Review sign-in logs for legacy authentication usage that bypasses MFA\n6. Verify Security Defaults or equivalent CA policies block legacy auth protocols\n7. Produce a risk report with prioritized remediation steps before tenant integration\n\n**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.\n\n## Output Format\n\n```\nAzure Active Directory Security Audit Report\n===============================================\nTenant: acme-acquired.onmicrosoft.com\nTenant ID: a1b2c3d4-e5f6-7890-abcd-ef1234567890\nAudit Date: 2026-02-23\nLicense: Azure AD Premium P2\n\nIDENTITY CONFIGURATION:\n  Security Defaults: Disabled (Conditional Access in use)\n  Conditional Access Policies: 12 (8 enforced, 3 report-only, 1 disabled)\n  Legacy Auth Blocked: Partial (blocked for admins only)\n\nPRIVILEGED ACCESS:\n  Global Administrators:              8 (recommended: \u003C= 4)\n  Permanent admin assignments:        6 (no PIM activation required)\n  Service principals with admin:      3\n  Guest users with privileged roles:  2\n\nACCOUNT HYGIENE:\n  Total users:                        1,247\n  Stale accounts (90+ days):          89\n  Guest users:                        234\n  Users without MFA registered:       156\n\nSIGN-IN RISK:\n  Risky sign-ins (last 30 days):      34\n  Legacy auth sign-ins (last 7 days): 67\n  Impossible travel detections:        5\n  Unfamiliar location sign-ins:       12\n\nCRITICAL FINDINGS:\n  1. 8 Global Administrators with permanent assignments (use PIM)\n  2. Legacy authentication not blocked for non-admin users\n  3. 156 users without MFA registration\n  4. 2 guest users with Privileged Role Administrator role\n```\n",{"name":5,"tags":47,"author":48,"domain":40,"license":15,"version":49,"nist_csf":50,"subdomain":32,"description":55,"mitre_attack":56},[32,25,30,33,29,28],"mahipal","1.0",[51,52,53,54],"PR.IR-01","ID.AM-08","GV.SC-06","DE.CM-01","Auditing Microsoft Entra ID (Azure Active Directory) configuration to identify risky authentication policies, overly permissive role assignments, stale accounts, conditional access gaps, and guest user risks using AzureAD PowerShell, Microsoft Graph API, and ScoutSuite.\n",[57,58,59,60,61],"T1078.004","T1098.003","T1556.006","T1069.003","T1526","main","54a798831d2266a3ca61ce68a7acb80b81160d57","skills\u002Fauditing-azure-active-directory-configuration",4414,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills","https:\u002F\u002Fmahipal.engineer\u002FAnthropic-Cybersecurity-Skills\u002F","https:\u002F\u002Fgithub.com\u002Fmukul975","Mahipal.engineer","🔐 Cybersecurity | 💻 Dev | 📷 Street Photographer\r\n🎓 MSc | 📚 Research & AI Security","2026-08-31 12:32:44",{"source":8,"skillName":5,"commands":73,"prompt":83,"zipAvailable":84},[74,77,80],{"tool":75,"command":76},"npx","npx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill auditing-azure-active-directory-configuration",{"tool":78,"command":79},"bunx","bunx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill auditing-azure-active-directory-configuration",{"tool":81,"command":82},"pnpm","pnpm dlx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill auditing-azure-active-directory-configuration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fauditing-azure-active-directory-configuration\u002FSKILL.md",true,[86,91,97],{"path":87,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":89,"sourceHtmlUrl":90},"LICENSE","许可证",11255,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fauditing-azure-active-directory-configuration\u002FLICENSE",{"path":92,"resourceType":93,"resourceTypeDesc":94,"sizeBytes":95,"sourceHtmlUrl":96},"references\u002Fapi-reference.md","REFERENCE","参考文档",2375,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fauditing-azure-active-directory-configuration\u002Freferences\u002Fapi-reference.md",{"path":98,"resourceType":99,"resourceTypeDesc":100,"sizeBytes":101,"sourceHtmlUrl":102},"scripts\u002Fagent.py","SCRIPT","脚本",6862,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fauditing-azure-active-directory-configuration\u002Fscripts\u002Fagent.py",[104,129,153,181,207,234],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":111,"publishedAt":42},"01M6AGDM3HJXTKXX15ZZ0ZVCJ3","verifying-build-provenance-with-slsa-sigstore","Verifies artifact signatures and SLSA provenance using Sigstore's cosign (verify, verify-attestation, verify-blob-attestation) and slsa-verifier (verify-artifact), enforcing keyless OIDC builder identity and source repo against SLSA Build levels. Use in CI\u002FCD before deploying artifacts, when consuming third-party attestations, establishing a SLSA Build L3 pipeline, or confirming provenance during incident response or admission control.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fverifying-build-provenance-with-slsa-sigstore\u002FSKILL.md",[110],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[112,113,114,115,41,40,116,117,37,118,119,120,121,122,123,124,125,126,127,128],"sigstore","provenance","slsa","verifying build provenance with slsa sigstore","incident response","identity","code","artifacts","ci","supply-chain","pipeline","supply-chain-security","t1195","attestation","code-signing","cosign","keyless",{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":136,"publishedAt":42},"01M6AGDGBPWYVZ2F11GFKJ4HZ9","validating-tpm-measured-boot-attestation","Verifies TPM 2.0 measured-boot integrity and remote attestation with tpm2-tools -- reading PCRs (tpm2_pcrread), replaying the boot event log, generating and checking signed quotes (tpm2_quote\u002Ftpm2_checkquote), and sealing secrets to a PCR policy. Use to confirm a system booted trusted firmware\u002Fkernel for Zero Trust device posture, detect boot-chain tampering via PCR drift, or build a golden-value baseline for fleet attestation.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalidating-tpm-measured-boot-attestation\u002FSKILL.md",[135],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[137,125,138,139,41,140,40,37,141,142,143,144,145,146,147,148,149,150,151,152],"boot","TPM","validating tpm measured boot attestation","policy","verification","ZeRO","firmware","Tools","measured-boot","PCR","integrity","secrets","remote-attestation","tpm2-tools","integrity-verification","trusted-computing",{"skillNo":154,"name":155,"nameZh":6,"description":156,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":157,"categories":158,"keywords":163,"publishedAt":42},"01M6AGDCW0Y4FXZ3362GT1941M","validating-backup-integrity-for-recovery","Validates backup integrity through cryptographic hash verification, automated restore testing, corruption detection, and recoverability checks to confirm backups are reliable for disaster recovery and ransomware response. Use before relying on backups for recovery, when building post-backup validation pipelines, auditing backup infrastructure for compliance, or checking immutable\u002Fair-gapped backups for silent corruption or tampering.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalidating-backup-integrity-for-recovery\u002FSKILL.md",[159,162],{"categoryNo":160,"categoryName":161,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[147,164,165,166,167,40,168,169,141,170,171,172,173,174,175,176,177,178,179,180],"backup","recovery","validating backup integrity for recovery","testing","infrastructure","validation","compliance","hash-verification","incident-response","ransomware","cryptocurrency","detection","t1078","t1490","immutable","disaster-recovery","restore-testing",{"skillNo":182,"name":183,"nameZh":6,"description":184,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":185,"categories":186,"keywords":188,"publishedAt":42},"01M6AGD9GBG2KZ336AE763J3WH","triaging-windows-with-kape","Runs KAPE (Kroll Artifact Parser and Extractor) to collect targeted forensic artifacts (registry hives, $MFT, event logs, prefetch, browser data) via Targets and parse them with Modules wrapping Eric Zimmerman's EZ Tools (PECmd, MFTECmd, RECmd). Use during early incident containment\u002Ftriage when full disk imaging is impractical but a defensible, parseable Windows artifact set is needed quickly, including at-scale remote collection.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-windows-with-kape\u002FSKILL.md",[187],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[189,190,191,40,192,193,194,195,196,197,198,199,200,201,202,203,144,204,205,206],"windows","kape","triaging windows with kape","registry","browser","logs","windows-forensics","dfir","mft","mftecmd","data","prefetch","eric-zimmerman","digital-forensics","SET","collection","pecmd","artifact-collection",{"skillNo":208,"name":209,"nameZh":6,"description":210,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":211,"categories":212,"keywords":214,"publishedAt":42},"01M6AGD5PW5J4EVZM958WD74ZQ","triaging-vulnerabilities-with-ssvc-framework","Triages and prioritizes vulnerabilities with CISA's Stakeholder-Specific Vulnerability Categorization (SSVC) decision tree, weighing exploitation status (via the CISA KEV catalog and FIRST EPSS API), technical impact, automatability, and mission prevalence to output Track\u002FTrack*\u002FAttend\u002FAct decisions. Use when prioritizing vulnerability scan results (OpenVAS, Nessus, Qualys) for remediation planning beyond raw CVSS scores.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-vulnerabilities-with-ssvc-framework\u002FSKILL.md",[213],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[215,216,217,40,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233],"vulnerabilities","framework","triaging vulnerabilities with ssvc framework","status","planning","CISA","vulnerability-management","risk-management","nessus","qualys","openvas","cvss","remediation","risk","vulnerability","api","prioritization","ssvc","decision-tree",{"skillNo":235,"name":236,"nameZh":6,"description":237,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":238,"categories":239,"keywords":241,"publishedAt":42},"01M6AGD24TTQQM4CXG69E3B9TJ","triaging-security-incident","Performs initial triage of security incidents using the NIST SP 800-61r3 and SANS PICERL frameworks, classifying incident type, assigning priority by business impact, and routing to the appropriate response team. Use when a SIEM\u002FEDR alert needs human classification, concurrent alerts must be prioritized, or a user report or threat-intel IOC match requires initial incident categorization.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-security-incident\u002FSKILL.md",[240],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[41,242,40,243,244,245,246,247,248,249,250,176,251,177,252,253,254,255,256,257],"triaging security incident","siem","file","ioc","soc","NIST-800-61","NIST","severity","edr","execution","analysis","classification","severity-classification","incident-triage","SANS-PICERL","SOC-operations"]