Skip to main content
Glama
kharonx
by kharonx

get-user-account-status-history

get-user-account-status-history
Read-onlyIdempotent

Check when a user account was disabled or re-enabled in Microsoft 365 by reading the Entra audit log, showing who made the change and the result.

Instructions

When was a user DISABLED (or re-enabled), by whom, with what result? Reads the Entra directory audit log (category UserManagement) for the given user and returns only the events that changed accountEnabled: 'Disable account' / 'Enable account' activities and 'Update user' events whose modifiedProperties contain AccountEnabled (true -> false = disabled). Other user updates are excluded. Newest first. RETENTION: Entra keeps directory audits 30 days (P1/P2; 7 days Free) - if the change is older the result is explicitly 'not available in audit log'; no date is estimated. Read-only; needs delegated AuditLog.Read.All + Directory.Read.All with admin consent and a reader role (Reports Reader / Security Reader / Global Reader).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoEnd of explicit time range (ISO date or datetime)
fromNoStart of explicit time range (ISO date or datetime, overrides timeRange)
changeNoWhich state changes to return: disabled (true->false), enabled (false->true) or any (default)
cursorNoContinuation token (nextCursor of a previous truncated response). Continues that listing; other query inputs are ignored.
maxItemsNoMaximum items to return across pages (default 50, max 500). Pagination via @odata.nextLink is handled automatically; when the result is truncated, pass its nextCursor as cursor to continue.
timeRangeNoNamed time range applied on activityDateTime
userIdOrUpnYesEntra object id or userPrincipalName of the target user, e.g. kiss.peter@ceg.hu
Install Server

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations (readOnlyHint, idempotentHint, etc.), the description adds substantial behavioral detail: it reads a specific audit category, filters to only accountEnabled changes, returns newest first, states the 30-day/7-day retention with explicit 'not available' behavior for older changes, and lists required permissions. This far exceeds what annotations alone convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but every sentence adds value: the opening question frames the purpose, the middle details the exact audit events and retention, and the end covers permissions and read-only nature. No fluff or repetition of schema content; it is structured to front-load the core function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only query tool with rich annotations and a fully documented schema, the description covers all essential contextual aspects: what events are returned, what is excluded, ordering, retention limitations, and authorization requirements. Even without an output schema, it conveys the result shape conceptually ('by whom, with what result').

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the schema already documents all seven parameters including enums and pagination. The description adds no parameter-specific semantics beyond the overall filtering behavior, so it stays at the baseline 3 without needing to compensate for undocumented parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource: it 'Reads the Entra directory audit log (category UserManagement) for the given user and returns only the events that changed accountEnabled'. It clearly names the activities ('Disable account'/'Enable account', 'Update user' events) and distinguishes itself from the more general sibling list-directory-audits by focusing solely on accountEnabled changes for one user.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives strong context on what the tool does and its scope, including that 'Other user updates are excluded' and that it is user-specific. It does not explicitly name the alternative (list-directory-audits) or state when not to use it, but the clear scope and filtering semantics effectively imply the appropriate use case.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kharonx/mcp_gateway'

If you have feedback or need assistance with the MCP directory API, please join our Discord server