PIM Role Gap Checker: Standing Admin Access Review

    1

    Someone got Global Administrator for a migration two years ago and still has it, permanently.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    PIM Role Gap Checker: Standing Admin Access Review

    Example session with this skill installed

    About 400 users, Microsoft 365 E5. Below is our role export (22 rows) and the PIM settings for Global Administrator. Our emergency accounts are bg-admin-01 and bg-admin-02. M. Lee left in August. What should we fix first?

    • Read your context and instructions
    • Compiled the pim role gap

    (Example output on sample data.)

    Privileged role check, 30 October 2026

    Principals: 14 · Assignments: 22 (active 12 · eligible 10) · Global Administrators: 6 (target < 5) · Privileged assignments: 22 (target < 10) · Permanent active outside emergency accounts: 7

    SeverityWho / roleGapFixWho noticesRollback
    CriticalGlobal Administrator6 assignments, 4 permanent outside the emergency accountsMake the 4 eligible in PIM, then move 2 people to Exchange Administrator and User AdministratorThe 4 admins activate before admin workMake the assignment active again
    CriticalM. Lee · SharePoint AdministratorLeft in August, role still activeRemove the assignment; disable the account if still enabledNobodyReassign the role
    CriticalGlobal Administrator settingsActivation without MFA or authentication contextPIM > Microsoft Entra roles > Settings > Global Administrator: require MFA on activationAdmins get an MFA prompt on activationUntick the setting
    Highj.smith (synced) · Exchange AdministratorAdmin role on an on-premises synced accountCreate a cloud-only admin account, assign the role eligible there, remove it from the synced accountj.smith signs in with a new accountAssign the role back
    Medium3 eligible assignmentsNo end dateSet an end date of 12 monthsNobodyEdit the end date

    Role table (extract)

    PrincipalTypeRoleAssignmentEndsSyncedLast sign-inStatus
    bg-admin-01UserGlobal AdministratorActivePermanentNo2026-07-14Keep (emergency)
    a.kimUserGlobal AdministratorActivePermanentNo2026-10-29Make eligible
    M. LeeUserSharePoint AdministratorActivePermanentYes2026-08-02Remove

    Not assessed

    Access reviews (not in the export).

    Summary for management

    Fourteen people and accounts hold admin rights, and seven of them hold them permanently. One leaver still has SharePoint admin rights and Global Administrator can be activated without MFA. Next week those two are fixed and four Global Administrators move to just-in-time access.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Admin rights pile up. Someone got Global Administrator for a migration two years ago and still has it, permanently.

    Paste the role assignments from Roles and administrators or PIM (active and eligible, with end dates), optionally the PIM settings for the Tier 0 roles, last sign-in dates and a leavers list, and the skill:

    • counts Global Administrators against the fewer-than-five target and privileged assignments against fewer than ten
    • flags permanent active admin roles outside the two emergency access accounts
    • flags synced, shared, guest and service principal admins, and admins with no sign-in for 90 days
    • checks Tier 0 activation settings: duration, MFA or authentication context, justification, approval
    • ranks the gaps Critical, High, Medium with up to 10 fixes (where to change it, who notices, rollback)
    • outputs a role table you can paste into a spreadsheet
    • ends with a 3-sentence summary for management

    It never runs commands that change the tenant, a role or an account. Markdown only: no scripts, no network access. It never touches the emergency access accounts and converts to eligible before removing anything. Works with the free Privileged Access and PIM Kit: Top 5, whose read-only checks print the role counts this skill reads. Not affiliated with or endorsed by Microsoft.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.

    Read-only: it never changes a role, policy or account. Works only on what you paste (role assignments, optional PIM settings, sign-in dates and a leavers list). It cannot check PIM licences or MFA registration itself; missing fields are reported as not in the export.

    How to use

    1. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    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

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 17 days ago

    • Free with an Agensi account

    Permissions

    No special permissions declared or detected

    Listed17 days ago

    What's inside

    Frequently Asked Questions

    Your role assignments from Roles and administrators or PIM: principal, role, active or eligible, permanent or end date, principal type and, if you have it, whether the account is synced. Optional: PIM settings for the Tier 0 roles, last sign-in dates, the names of your emergency access accounts and a leavers list.

    It is a standard SKILL.md file, so it works with agents that read SKILL.md, such as Claude Code, Codex CLI and Cursor. No scripts, no API permissions and no network access.

    Microsoft Learn guidance on Entra roles and PIM, re-read on 28 and 30 October 2026: fewer than five Global Administrators, fewer than ten privileged assignments, eligible instead of permanent roles, cloud-only admin accounts and Tier 0 activation settings. If Microsoft changes something, give it the Learn page and it uses your version.

    The analysis is strictly read-only and performed on the data you provide; the skill cannot access your live environment or make automated changes to your tenant.

    No. It marks the emergency accounts you name, never recommends removing their permanent Global Administrator role, and never suggests removing the last Global Administrator. It converts permanent roles to eligible before it removes anything.

    New in Security

    Free