entraadm MCP

v1.11.1
io.github.shigechika/entraadm-mcp Checked 2 days ago Published 2 days ago

MCP server for Microsoft Entra ID sign-in and audit-log triage (read-only by default)

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

health_check

Fleet-standard health probe: service/version/status plus two independent Graph probes. ``graph`` confirms Microsoft Graph is reachable at all (``GET /users`` with ``$top=1`` -- needs only ``User.Read.All``, the minimum permission every deployment of this server needs anyway). ``signin_probe`` additionally confirms the current credential can read sign-in logs -- the permission every other tool here except ``get_user`` depends on. Both probes always run, independently of each other: a tenant that has AuditLog.Read.All but not (yet) the baseline User.Read.All would ot…

get_user

One account's identity/lifecycle state -- the first thing to check on any triage report. ``account_enabled=false`` means the account itself is the whole story; stop there. A stale ``last_password_change_date_time`` alongside a fresh "wrong password" complaint (AADSTS50126 in ``signin_logs``) is the most common on-the-ground pattern: the password changed or expired somewhere, and a cached credential on one device is now stale. ``on_premises_sync_enabled=true`` means this account is synced from an on-premises directory (Entra Connect) -- Entra is a downstream copy of…

ParameterTypeDescription
upn *string
tenant

signin_logs

One user's recent sign-in events, AADSTS-annotated. The most direct answer to "why can't this person log in": each entry's ``error_code_meaning`` translates the raw AADSTS code (e.g. 50126 -> "invalid credentials (wrong password)") so triage rarely needs a second lookup. ``result`` filters client-side after the Graph fetch (Graph cannot filter sign-ins on status/errorCode server-side): "failure" (the default) keeps only failed attempts, "success" keeps only clean ones, "all" keeps everything. Because the filter is client-side, this walks pages until it has…

ParameterTypeDescription
user *string
hoursinteger
max_pages
resultstring
tenant
topinteger

signin_by_ip

Every sign-in from one source IP: who got in from it, who was tried, and when. The follow-up to a ``spray_suspects`` or ``shared_ips`` hit: Graph can filter sign-ins on ``ipAddress`` server-side, so this is one cheap query, not a log walk. ``users`` summarises the IP per account (successes, failures, first/last seen, up to 50 accounts) over every row fetched; ``events`` lists the newest ``top`` entries that match ``result`` ("all" by default, or "success" / "failure"), each carrying the account name and the same AADSTS annotation as ``signin_logs``. ``capped=tr…

ParameterTypeDescription
ip *string
hoursinteger
max_pages
resultstring
tenant
topinteger

signin_failure_stats

Tenant-wide sign-in failure aggregation -- the Entra ID counterpart to the RADIUS failure patrol. Time-bounded (ENTRAADM_DEADLINE, default 45 s): on a wide window or a busy day the scan stops early and ``capped=true`` marks the counts as a lower bound; narrow ``hours`` for a full count. Aggregates failed sign-ins across the whole tenant into four views: top AADSTS error codes (with the same meaning annotations as ``signin_logs``), top failing users, top applications, and top source IPs. ``spray_suspects`` flags any IP with failed sign-ins against 5 or more dis…

ParameterTypeDescription
hoursinteger
max_pages
tenant

signin_success_stats

Tenant-wide *successful* sign-in aggregation by source IP -- the view that finds a breach. ``signin_failure_stats`` shows who is being attacked; this shows whether anyone got in. The breach signature is one source IP signing in successfully as several different accounts, most often over a legacy protocol (``clientAppUsed`` such as "Authenticated SMTP" or "IMAP4", which carry no MFA). ``shared_ips`` lists the IPs with successes for ``min_distinct_users`` or more distinct accounts, most-shared first (up to 50 IPs, ``shared_ips_capped`` when more qualified; account na…

ParameterTypeDescription
hoursinteger
max_pages
min_distinct_usersinteger
tenant

compromise_suspects

Accounts that were probably taken over, from one walk of the sign-in log. The success-side counterpart of ``signin_failure_stats``' spray suspects. Two findings, both from EXTERNAL source IPs (outside the address ranges in ENTRAADM_SITES_INI; without that file every IP counts as external): - ``spray_breaches`` (severity ``high``): an IP with credential failures (wrong password, unknown, locked or disabled account -- not MFA prompts, session interrupts or Conditional Access blocks, which follow a correct password) for ``min_spray_users`` or more distinct acco…

ParameterTypeDescription
hoursinteger
max_pages
min_spray_usersinteger
tenant

directory_audits

Who did what to the directory, and when -- the operator-side counterpart to signin_logs. Every admin action against a user object (block/unblock, password reset, role assignment, attribute edits) appears here, naming the actor (``initiated_by``) and the affected object(s) (``target_resources``). This is the record a manual "unblock and reset" intervention -- like the one that closed the 2026-08-21 case this server exists to shorten -- leaves behind; it is how a later triage can tell "already handled by a human" from "still open". ``user``, when given, matches…

ParameterTypeDescription
category
hoursinteger
max_pages
tenant
topinteger
user

get_user_auth_methods

Registered authentication methods for one account -- is MFA actually set up? ``mfa_registered`` answers "would this account survive a password-spray hit": True iff at least one non-password method is registered (Authenticator app, phone, FIDO2 security key, Windows Hello, a temporary access pass, software OATH token, or a platform credential/passkey). ``password`` itself is excluded from that count -- every account has one, so its presence alone says nothing about MFA coverage. A nonexistent account is a normal answer, not a tool failure: the result is ``{…

ParameterTypeDescription
upn *string
tenant

list_subscriptions

The Azure subscriptions this credential can see, as ARM lists them. Azure Resource Manager in the DEFAULT tenant only, also when several tenants are configured (``ENTRAADM_CONFIG``). Read-only (``GET /subscriptions``; needs no RBAC beyond being able to see a subscription at all). The discovery anchor for ``vm_backup_status`` and ``vm_backup_policies``: both accept a subscription id or display name from this list. An empty list with ``auth`` working means no Reader role has been granted anywhere yet. ``capped`` marks a listing cut short by the page budget.

ParameterTypeDescription
max_pages

vm_backup_status

Which Azure VMs are backed up by Azure Backup, and whether the last backup succeeded. Azure Resource Manager in the DEFAULT tenant only, also when several tenants are configured (``ENTRAADM_CONFIG``). Joins every VM of a subscription (``Microsoft.Compute/virtualMachines``) with the Azure-VM protected items of its Recovery Services vaults, on the VM's ARM id (case-insensitively; ARM casing differs between the two services). Read-only; needs the Reader role on the subscription. Per VM: - ``protected``: ``true`` when a protected item exists with ``protect…

ParameterTypeDescription
max_pages
stale_hoursinteger
subscription

vm_backup_policies

Schedule and retention of the Azure VM backup policies in each Recovery Services vault. Azure Resource Manager in the DEFAULT tenant only, also when several tenants are configured (``ENTRAADM_CONFIG``). Read-only; needs the Reader role on the subscription. Per policy: ``policy_type`` (``V1`` = ``SimpleSchedulePolicy``, ``V2`` = ``SimpleSchedulePolicyV2`` with an hourly / daily / weekly schedule), ``schedule`` (frequency, run times in UTC, weekdays, or the hourly window), ``retention`` (``LongTermRetentionPolicy``: daily / weekly / monthly / yearly blocks with…

ParameterTypeDescription
max_pages
subscription

vm_activity

What happened to an Azure VM in a time window: operations people ran, and events Azure raised. Azure Resource Manager in the DEFAULT tenant only, also when several tenants are configured (``ENTRAADM_CONFIG``). Answers "did someone restart this VM, or did Azure?" from the Azure activity log of the VM's subscription. Read-only; needs the Reader role on the subscription. Two reads: the VM's resource group (server-side filter, so a busy subscription cannot crowd the VM's own events out of the page budget) feeds ``health`` and ``vm_operations``; the whole subscription…

ParameterTypeDescription
vm *string
end
hoursinteger
max_pages
resource_group
start
subscription

m365_service_health

Microsoft 365 service status per service, and the open incidents and advisories. Two Graph reads (``ServiceHealth.Read.All``): ``healthOverviews`` (one row per service with its current status) and the unresolved ``serviceAnnouncement/issues``, newest first. A sign-in failure spike reads very differently while Entra or Exchange has an open incident, which is why ``daily_brief`` carries this section too. Each section degrades on its own (``{"error", "missing_permission"}``); ``summary`` is computed from whatever came back. ``capped`` means either collection was cut s…

ParameterTypeDescription
max_pages
tenant

audit_log_search_start

Start a Microsoft Purview audit log search: what was done in OneDrive/SharePoint, Exchange, Entra. The follow-up to a confirmed takeover: the sign-in log shows which resources a session obtained tokens for, this shows what it then did (files opened or downloaded, mailbox rules and cmdlets, directory changes). A search runs asynchronously in Microsoft 365 and usually takes several minutes, so this only submits it (Graph ``POST /security/auditLog/queries``) and returns ``query_id``; call ``audit_log_search_result`` with that id (and the same ``tenant``) until ``done`…

ParameterTypeDescription
end
hoursinteger
ip_addresses
keyword
object_ids
operations
record_types
service
start
tenant
user

audit_log_search_result

Status and, once finished, the summarised records of an audit search started by audit_log_search_start. Reads Graph ``GET /security/auditLog/queries/{id}``. While ``status`` is ``notStarted`` or ``running`` the answer is the status only (``done: false``); call again in a minute or two. ``failed``, ``cancelled`` and any status this server does not know are ``done: true`` with an ``error``. Once ``succeeded``, the records are paged (``/records``) and come back as: - ``summary``: ``total_records``, ``first_seen``/``last_seen``, counts by operation, service, record…

ParameterTypeDescription
query_id *string
max_pages
tenant
topinteger

daily_brief

One-call morning-patrol summary: M365 service health, sign-in failures, spray suspects, admin actions. Combines ``m365_service_health``, ``signin_failure_stats``, ``directory_audits`` and ``compromise_suspects`` (its counts and the top 5 of each list; ``summary.compromise_suspects`` has the high/medium counts) into one result with a compact ``summary`` on top. The failure stats and the compromise suspects come from one walk of the sign-in log. The shape matches this fleet's other ``daily_brief`` tools. A permission failure in one section degrades only that section'…

ParameterTypeDescription
hoursinteger
max_pages
samplesinteger