Skip to content

Guide · Agent skill

How to use the Auditing Entra ID with AADInternals agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

This skill lets an AI agent drive AADInternals, a PowerShell toolkit for Microsoft Entra ID (formerly Azure AD) and AD FS, through a structured identity security assessment. It is meant for security consultants and blue teams running authorized Entra ID or Microsoft 365 testing. After reading this guide you will know how to install the skill, how to ask the agent for each stage of an assessment, and what you need in place before running anything.

Auditing Entra ID with AADInternalsmukul975/Anthropic-Cybersecurity-Skills · Apache-2.0

Quick start

  1. 1Download and unzip the skill. Download the skill ZIP from this page and unzip it into ~/.claude/skills/ or your project's .claude/skills/ folder. Alternatively, upload the ZIP under Settings → Capabilities → Skills in the Claude apps.
  2. 2Install AADInternals. On a Windows host, run Install-Module AADInternals -Scope CurrentUser and then Import-Module AADInternals in PowerShell.
  3. 3Confirm authorization and scope. Make sure you have written authorization or rules of engagement covering the target tenant and any backdoor or federation tests.
  4. 4Ask for one stage. Request a single stage in plain language, such as outsider reconnaissance on a named domain you are authorized to test.
  5. 5Review the output. Check the cmdlet results the agent reports before asking for the next stage.
  6. 6Request findings and recommendations. Ask the agent to document exposure and hardening recommendations, such as token-signing certificate protection and federation monitoring.

What is an agent skill and what does this one do?

An agent skill is a folder containing a SKILL.md file and supporting files that an AI agent loads when a request matches the skill's description. This skill's SKILL.md describes an assessment workflow built around AADInternals cmdlets.

Once installed, the agent can run unauthenticated reconnaissance of a domain's tenant and federation settings, optionally test whether usernames exist, acquire tokens for Microsoft APIs, enumerate directory objects with a valid token, and check whether federation signing certificates would allow Golden SAML forgery. It then helps document findings and hardening recommendations. The skill is built for authorized red-team and defensive validation work, not general use.

Install the auditing-entra-id-with-aadinternals skill

Download the skill ZIP from this page and unzip it. For a personal install, place the unzipped skill folder in ~/.claude/skills/. For a single project, place it in that project's .claude/skills/ folder.

Alternatively, in the Claude apps go to Settings → Capabilities → Skills and upload the ZIP there.

The skill also needs AADInternals itself. Install it from the PowerShell Gallery on a Windows host:

Install-Module AADInternals -Scope CurrentUser Import-Module AADInternals

How do you trigger the skill with natural requests?

You do not need a special command. Describe the task in plain language and include the domain and scope, for example: ask the agent to run outsider reconnaissance on a domain you are authorized to test, or to check whether the AD FS token-signing certificate is protected against Golden SAML. Mention that the work is authorized and under written rules of engagement so the agent treats it as an assessment.

Name the stage you want. The workflow has distinct stages (recon, user enumeration, token acquisition, directory enumeration, federation inspection, backdoor testing), and asking for one stage at a time keeps the evidence clear.

  • Run unauthenticated recon on target.com and summarise the federation type and SSO status.
  • Find the tenant GUID for target.com and list verified domains.
  • Using my cached Graph token, enumerate users and flag synced accounts.
  • Check whether the AD FS signing certificate on adfs.target.com is protected against Golden SAML and list hardening steps.

What the workflow covers, step by step

The SKILL.md workflow runs in order. Step 1 is outsider reconnaissance using Invoke-AADIntReconAsOutsider, Get-AADIntLoginInformation and Get-AADIntTenantID, which need no credentials. Step 2 is optional external user enumeration with Invoke-AADIntUserEnumerationAsOutsider, which the source describes as noisy.

Step 3 acquires tokens with Get-AADIntAccessTokenForAADGraph, Get-AADIntAccessTokenForMSGraph and Get-AADIntAccessTokenForEXO, where -SaveToCache lets later cmdlets reuse the token. Step 4 uses that token for directory reads such as Get-AADIntTenantDetails and Get-AADIntUsers.

Step 5 inspects federation and AD FS configuration, and Step 6 covers the federation backdoor and Golden SAML test. Step 6 is only for controlled tenants with explicit authorization and needs a Global Administrator token.

Invoke-AADIntReconAsOutsider -DomainName "target.com" | Format-Table Get-AADIntLoginInformation -Domain "target.com" Get-AADIntTenantID -Domain "target.com"

What do you need before running it?

Requirements from the skill: a Windows host with PowerShell 5.1+ (or PowerShell 7 on the supported subset), the AADInternals module from the PowerShell Gallery, Python 3 for the bundled scripts/agent.py helper, and written authorization or rules of engagement for the target tenant.

For backdoor and federation tests you also need Global Administrator or an equivalent account in the target tenant. The skill assumes familiarity with SAML, OAuth tokens and Azure AD Connect, so it is not a starting point for beginners.

  • Windows host with PowerShell 5.1+ or PowerShell 7 (supported subset)
  • AADInternals module from the PowerShell Gallery
  • Written authorization / rules of engagement for the target tenant
  • Global Administrator or equivalent for backdoor/federation tests
  • Python 3 for scripts/agent.py

Safety notes: scripts and network access

This skill runs scripts and uses the network. The bundled scripts/agent.py helper is Python 3, and the AADInternals cmdlets query Microsoft endpoints, including public ones such as getuserrealm and OpenID configuration. Read the scripts and understand what they send before you run them, especially on a machine that holds production credentials.

The toolkit can forge SAML tokens and install persistent federation backdoors that impersonate any tenant user. Use it only against tenants you own or have explicit written authorization to test. Unauthorized use violates the Computer Fraud and Abuse Act and equivalent laws. External user enumeration is noisy and will likely appear in logs, so plan for it in your rules of engagement.

Tips for getting useful output

Keep the scope explicit in every request, including the domain names and which stages are allowed. Ask the agent to save evidence and the recommendations it produces, since the skill is designed to document exposure and hardening steps.

If you are a blue team, the skill can also help you produce realistic AADInternals telemetry to build detections. Pair it with a Graph-log hunting skill if you have one, as the source suggests.

  • State the authorization and scope in each request
  • Run one stage at a time and review output before moving on
  • Ask for findings and hardening recommendations, not only raw output
  • Consult the references/api-reference.md file for cmdlet parameters

What people use it for

  • Mapping a domain's verified domains, tenant ID and federation type before a credential attack assessment.
  • Checking whether AD FS token-signing certificates are protected against Golden SAML during a red-team engagement.
  • Testing which Microsoft first-party APIs a token acquired with valid credentials can reach.
  • Producing realistic AADInternals telemetry so a detection engineer can build alerts.
  • Documenting external attack surface and hardening recommendations for a client report.

Frequently asked questions

Is the auditing-entra-id-with-aadinternals skill free?

The skill is licensed under Apache-2.0, as listed on this page. AADInternals is installed separately from the PowerShell Gallery; this page does not state any price for either.

What do I need to install the Auditing Entra ID with AADInternals skill?

Download the ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder, or upload it under Settings → Capabilities → Skills. You also need a Windows host with PowerShell 5.1+ or PowerShell 7 on the supported subset, and the AADInternals module installed with Install-Module AADInternals -Scope CurrentUser.

Do I need Global Administrator rights to use this skill?

No, the reconnaissance steps need no credentials. Token acquisition needs valid credentials, and the federation backdoor and Golden SAML tests require Global Administrator or an equivalent account in the target tenant.

What is an alternative to AADInternals for Entra ID outsider recon?

The SKILL.md mentions a cross-platform AsOutsider-only reimplementation at https://github.com/synacktiv/AADOutsider-py, which covers the no-credentials part of the work. The source does not compare its features with AADInternals beyond that.

Why does the skill say it is not for beginners?

The source says it assumes familiarity with SAML, OAuth tokens and Azure AD Connect, and that backdoor tests require Global Administrator rights. Without that background, the output is hard to interpret safely.

Is it safe to run the skill on any Microsoft 365 tenant?

No. The skill can forge SAML tokens and install persistent federation backdoors, so you should only test tenants you own or have explicit written authorization to test. The source also notes that unauthorized use violates the Computer Fraud and Abuse Act and equivalent laws.

Why does my AADInternals command fail?

The source does not list troubleshooting steps. Check that you are on a Windows host with PowerShell 5.1+ or PowerShell 7, that the module imported with Import-Module AADInternals, and that the token you need was acquired with -SaveToCache if a later cmdlet depends on it.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use this skill if you are a security consultant or blue team running an authorized Entra ID or Microsoft 365 assessment and you already understand SAML, OAuth and Azure AD Connect. Pick something else if you need a general-purpose tool, want to test a tenant without written authorization, or are learning identity security, since the skill is built for experts and carries real legal and safety risk.

Download the skill