Skip to content

Guide · Agent skill

How to use the Attacking Entra ID with ROADtools agent skill

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

This guide explains how to install and use the attacking-entra-id-with-roadtools agent skill, which teaches an AI agent to drive the open-source ROADrecon and roadtx tools against Microsoft Entra ID (formerly Azure AD). It is written for security testers who may be new to agent skills. By the end you will know what the skill does, how to add it to your agent, how to phrase requests so it applies, and what you need in place before any testing begins.

Attacking Entra ID with ROADtoolsmukul975/Anthropic-Cybersecurity-Skills · Apache-2.0

Quick start

  1. 1Confirm authorization and scope. Get written permission and a defined scope for the target Entra ID tenant before any step. Note which credential you are allowed to use.
  2. 2Install the prerequisites. Install Python 3.7 or later, then install roadrecon and roadtx with pip. Add Firefox and geckodriver only if you need roadtx Selenium flows.
  3. 3Add the skill to your agent. Unzip the downloaded skill into ~/.claude/skills/ or a project's .claude/skills/ folder, or upload the ZIP under Settings → Capabilities → Skills in the Claude apps.
  4. 4Ask for the task in plain language. Describe the tenant, your credential and your authorization, then state the goal, such as gathering the directory or exchanging a refresh token.
  5. 5Review the output and record findings. Check the gathered data in the ROADrecon GUI or the exported files, and keep a record of what was accessed and what changed.

What the skill makes the agent do

An agent skill is a folder of instructions and reference files that your AI agent loads when a task matches the skill's description. This one covers two tools from ROADtools, created by Dirk-jan Mollema. ROADrecon authenticates to a tenant, gathers the directory (users, groups, roles, applications, service principals, devices and conditional-access policies) into a local SQLite database, and serves a GUI for offline browsing. roadtx acquires and exchanges tokens across OAuth flows, handles device registration and works with Primary Refresh Tokens (PRTs).

  • Enumerate a tenant's directory objects into roadrecon.db for offline review.
  • Analyze conditional-access policies and export data for BloodHound.
  • Acquire tokens and exchange refresh tokens between resources, such as Azure Resource Manager and Microsoft Graph.
  • Walk through device registration and PRT-based SSO steps.

What you need before you install

The skill is for authorized testing only. Confirm you have written authorization and a defined scope for the target tenant before installing or running anything. You also need a starting credential that is in scope for that tenant.

  • Python 3.7 or later.
  • The roadrecon and roadtx Python packages, installed with pip.
  • Firefox and geckodriver, only if you use some roadtx Selenium flows.
  • A credential in scope: username and password (no MFA flows), a device code session, a refresh or access token, or a PRT.
  • Written authorization for the target Entra ID tenant.
python -m pip install roadrecon python -m pip install roadtx roadrecon --help roadtx --help

Install the skill in Claude

Download the skill ZIP from this page. You can add it in one of two ways, depending on how you use Claude.

For Claude Code, unzip the download into ~/.claude/skills/ so it is available in every project. To limit it to one project, unzip it into that project's .claude/skills/ folder instead.

In the Claude apps, open Settings, go to Capabilities, then Skills, and upload the ZIP there.

  • Personal install: ~/.claude/skills/ (Claude Code).
  • Project install: .claude/skills/ inside the project folder (Claude Code).
  • Claude apps: Settings → Capabilities → Skills, then upload the ZIP.

Trigger the skill with natural requests

You do not need a special command. Describe the task in plain language that matches the skill's purpose: enumerating an Entra ID tenant, acquiring or exchanging tokens, or working through PRT-based access. Name the tenant, the credential you hold and the authorization you have, so the agent can choose the right flow.

  • 'I have written authorization to test contoso.onmicrosoft.com. Using ROADrecon, gather the directory and tell me which users hold privileged roles.'
  • 'I have a refresh token from the engagement. Exchange it for a Microsoft Graph token using roadtx.'
  • 'Walk me through a device-code login with ROADrecon for this in-scope tenant, then export the data for BloodHound.'
  • 'Explain which conditional-access policies apply to legacy authentication in the gathered data.'

Follow the core ROADrecon workflow

Start by authenticating with the flow that matches your foothold. Device code supports MFA, while the username and password flow does not. Authentication writes a .roadtools_auth file in the working directory. Then gather the directory into roadrecon.db, and open the GUI to browse it at the local address the tool reports. Analysis plugins can then review conditional-access policies and export to BloodHound format.

  • Use --mfa during gather only if you hold a privileged role, since the source notes it requires one.
  • The GUI runs locally at http://127.0.0.1:5000 and works offline once the data is gathered.
roadrecon auth --device-code roadrecon gather roadrecon gui roadrecon plugin policies roadrecon plugin bloodhound

Acquire tokens and pivot with roadtx

roadtx gets tokens for a chosen client and resource. Tokens are written to .roadtools_auth, or printed with --tokens-stdout. A family refresh token from one first-party client can be redeemed for another resource without re-authenticating. The skill covers these exchanges and device registration with PRT-based SSO, and the agent can decode token claims with the describe command.

  • Use describe to inspect the claims of a stored or supplied token.
  • Use getscope with --foci to find which first-party clients hold a given scope.
roadtx gettokens -u user@tenant.com -p 'Password123!' -c azcli -r msgraph roadtx refreshtokento -r azrm roadtx describe -t <JWT>

Safety notes: scripts and network access

This skill runs scripts and makes live network calls to Microsoft Entra ID. ROADtools can register devices, mint and exchange tokens, and enumerate directory objects, and these actions can change real identity state. Use it only against tenants you own or have written permission to test, and define scope and rules of engagement first. Review the skill's bundled files, including scripts/agent.py, before running it in an environment that holds real credentials. Keep test credentials and tokens out of shared logs and reports.

  • Run against production tenants only within a defined scope.
  • Prefer a lab tenant you own when learning.
  • Remember that device registration and token minting can affect real accounts.

What people use it for

  • Mapping users, groups and directory roles in an authorized Entra ID red-team engagement.
  • Reviewing gathered conditional-access policies to see where legacy authentication is allowed.
  • Exporting directory data to BloodHound to look for attack paths in an authorized test.
  • Checking whether refresh-token exchange across resources is constrained by the tenant's controls.
  • Validating blue-team detections and token controls in a lab tenant you own.

Frequently asked questions

How do I install the attacking-entra-id-with-roadtools skill?

Download the skill ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder for one project. In the Claude apps, you can instead upload the ZIP under Settings → Capabilities → Skills.

What do I need installed to use ROADtools with this skill?

You need Python 3.7 or later and the roadrecon and roadtx packages installed with pip. Firefox and geckodriver are needed only for some roadtx Selenium flows. You also need a credential in scope for the tenant and written authorization to test it.

Is this skill free to use?

The skill is licensed under Apache-2.0, as stated in its listing. ROADtools is described in the source as open source. Check each project's licence terms yourself before using or redistributing them.

Can I use this on a tenant I do not own?

Only with explicit written authorization for that tenant and a defined scope. The skill itself warns that unauthorized access to a cloud tenant is illegal.

Why does ROPC login fail when my account uses MFA?

The username and password flow does not support MFA, according to the skill. Use the device-code flow with roadrecon auth --device-code or roadtx interactiveauth instead.

What are alternatives to ROADtools for Entra ID testing?

The skill's sources reference BloodHound CE for graph analysis of exported Entra data. This skill covers ROADtools specifically, so choose other tools based on your engagement's needs and your own evaluation.

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

This skill suits security professionals running authorized Entra ID or Azure red-team work, students practicing in a lab tenant they own, and blue-team engineers testing conditional-access and token controls. It is not suitable for anyone without written authorization, for general Microsoft 365 or Entra administration, or for production tenants without a defined scope and rules of engagement.

Download the skill