- Home
- Skills
- APIs & Backend
- AD Group Membership Mapper
Works with the AI Agents you already use
AD Group Membership Mapper
Map and visualize effective Active Directory group memberships, including nested groups and circular dependencies.
$2.99
AD Group Membership Mapper
Example session with this skill installed
Map effective memberships from memberships.csv for user 's.chen'. Highlight 'Domain Admins' and 'Finance-Read' as privileged. Generate a nesting diagram.
- Read your context and instructions
- Compiled the ad group membership
- Generated the data export
I have processed memberships.csv and expanded all nested relationships for user s.chen. The analysis identified 12 effective group memberships, including two via third-level nesting.
AD Membership Audit: s.chen
| Group Name | Relationship | Path | Privilege Level |
|---|---|---|---|
| Finance-Read | Nested | s.chen -> Finance-All -> Finance-Read | High |
| All-Staff | Direct | s.chen -> All-Staff | Low |
| VPN-Users | Nested | s.chen -> Remote-Access -> VPN-Users | Medium |
| Domain Admins | Nested | s.chen -> IT-Ops -> Domain Admins | CRITICAL |
| Web-Devs | Direct | s.chen -> Web-Devs | Low |
Circular Dependencies Detected
Group: GPO-Apply-01<->Group: GPO-Apply-02(Circular loop identified)
Group Nesting Diagram
graph TD
user_schen[s.chen]
group_it_ops[IT-Ops]
group_dom_admin[Domain Admins]
group_fin_all[Finance-All]
group_fin_read[Finance-Read]
user_schen --> group_it_ops
user_schen --> group_fin_all
group_it_ops --> group_dom_admin
group_fin_all --> group_fin_read
Next steps
- Review the
IT-Opsgroup membership, as it grants s.chen effective Domain Admin rights. - Fix the circular reference between
GPO-Apply-01andGPO-Apply-02to prevent processing errors in other tools. - Run the cleanup command to generate a list of groups with zero members found during this scan.
memberships.csv
CSV · data export
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Auditing Active Directory access is difficult when groups are buried inside other groups. This skill processes raw CSV exports of direct memberships to map every user's full effective access, exposing hidden permissions that standard reports often miss.
What it does
- Nested expansion resolves every layer of group-in-group membership to find the true list of effective groups for every user.
- Circular dependency detection identifies and flags infinite loops where Group A contains Group B and Group B contains Group A.
- Privilege auditing highlights users belonging to high-stakes groups like Domain Admins, Enterprise Admins, or custom sensitive groups.
- Visual mapping generates Mermaid diagrams to visualize complex nesting structures for easier architectural reviews.
- Orphan identification finds users with zero memberships and groups with zero active members to assist in directory cleanup.
How it works
- Run the included PowerShell script
Export-GroupMembership.ps1to generate a CSV of direct relationships. - Provide the CSV to the skill to begin the recursive expansion process.
- Specify specific users or privileged group lists to filter the audit results.
- Review the generated membership tables, circularity alerts, and Mermaid nesting diagrams.
Frameworks & tools
Uses PowerShell for data extraction via Get-ADGroupMember and Python for the recursive graph processing and Mermaid diagram generation.
Why this beats prompting it yourself
Standard prompts often fail to handle recursion depth or large CSV datasets correctly, leading to incomplete membership lists. This skill uses a logic-first approach to ensure every nested path is traversed and circular loops are handled without crashing.
Use cases
- Conduct a security audit to find every user with effective Domain Admin rights.
- Debug access issues for a specific user who should (or should not) have specific permissions.
- Map out and simplify legacy Active Directory structures with deep nesting.
- Identify orphaned accounts and empty groups for periodic cleanup tasks.
Known limitations
Large environments with tens of thousands of groups may result in overly complex diagrams. PowerShell script requires AD DS tools installed.
Performance may degrade with extremely large export files. Diagrams are only recommended for manageable fan-out to prevent visual clutter. Requires AD DS PowerShell modules for extraction.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 1 month ago