skills/audit-history/SKILL.md
Query audit history in Dynamics 365 — find who changed what, when, and what the old/new values were. Check if auditing is enabled on entities and individual fields. Use when asked "who changed this record", "show audit log", "is auditing enabled", "what changed on account X".
npx skillsauth add nickmeron/Dataverse-MCP-Server skills/audit-historyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The user wants to investigate audit history or audit configuration in Dynamics 365.
Argument provided: $ARGUMENTS
Select environment — call list_environments, ask the user, call select_environment.
Determine the task:
query_records to search for the record by name or other fieldsget_audit_history with record_id and entity_logical_namehours_back, action, user_id, attribute_filterfind_users if needed)Use get_audit_history with attribute_filter set to the specific field names:
get_audit_history(
record_id: "guid",
entity_logical_name: "account",
attribute_filter: "telephone1,emailaddress1"
)
This returns only audit entries where those specific fields were modified.
Use get_audit_history with hours_back:
get_audit_history(
entity_logical_name: "account",
hours_back: 24
)
Can combine with user_id to see one person's changes, or action: 3 to see only deletions.
Three levels to check:
Organization level — get_org_audit_status
Entity level — get_entity_audit_status with the entity logical name
IsAuditEnabled is true/false on the entityField level — get_field_audit_status with the entity and optionally specific fields
IsAuditEnabled flagPresent all three levels together so the user gets the complete picture:
Organization auditing: ✅ Enabled (retention: 30 days)
Entity 'account' auditing: ✅ Enabled
Field auditing:
- name: ✅ Audited
- telephone1: ✅ Audited
- emailaddress1: ❌ NOT Audited
- revenue: ✅ Audited
get_audit_history(
action: 3, # Delete
hours_back: 168 # 7 days
)
find_users with their nameget_audit_history with user_id and optional hours_back| Code | Action | |------|--------| | 1 | Create | | 2 | Update | | 3 | Delete | | 4 | Activate | | 5 | Deactivate | | 11 | Cascade | | 12 | Upsert | | 13 | Merge |
When get_audit_history retrieves details for a specific record, each entry includes:
audit_detail.NewValue.Attributes — the new values after the changeaudit_detail.OldValue.Attributes — the old values before the changeaudits entity has a retention policy — old records are purged after the configured periodtop and hours_back to limit scopeRetrieveAuditDetails function is called per-record for the full change detail, so fetching many records with details can be slow. The tool automatically limits detail enrichment to the first 20 records._userid_value GUIDs to human names, use find_users or query_records on systemuserstesting
Create, monitor, and manage bulk deletion jobs in Dynamics 365. Use when asked "bulk delete", "delete all records of type X", "create a bulk delete job", "check bulk delete status", "cancel bulk delete", "why did bulk delete fail".
data-ai
Produce a business-readable summary of a Dynamics 365 record or set of records. Uses metadata to understand the schema before querying.
testing
Investigate users, security roles, teams, and permissions in Dynamics 365. Use when asked "who has access to...", "what roles does X have?", "compare roles", or "show me users".
data-ai
Query Dynamics 365 records using natural language. Translates questions into OData queries with metadata-aware field selection.