Skip to main content
Glama
Dynamics 365 MCP Server

Dynamics 365 MCP Server

by Kenny-666

query_security_principals

Read-only

Query visible users, teams, or roles with ID, name, type, and business-unit filters to inspect security principals; bounded results do not imply effective record permissions.

Instructions

Read bounded visible users, teams or roles with optional ID/name/business-unit filters. Disabled users are included unless enabled is explicit. Catalog entries do not imply effective record permissions.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "query_security_principals"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNoMaximum visible rows, default 50. Reaching this bound is not a complete inventory.
enabledNoOnly systemuser: explicit enabled/disabled filter.
maxPagesNoCompatibility alias for max_pages; conflicting values are rejected.
max_pagesNoMaximum native pages, default 5. Bounded reads report incompleteness.
nameKeywordNoCompatibility alias for name_keyword; conflicting values are rejected.
principalIdNoCompatibility alias for principal_id; conflicting values are rejected.
name_keywordNo
principal_idNo
principalTypeNoCompatibility alias for principal_type; conflicting values are rejected.
businessUnitIdNoCompatibility alias for business_unit_id; conflicting values are rejected.
principal_typeNoDefault systemuser.
business_unit_idNo
environment_profileNoOptional named environment profile for this call; omit to use the configured default.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.2
    • addedInput schema / properties / environment_profile
      Added value: +{
      +  "description": "Optional named environment profile for this call; omit to use the configured default.",
      +  "pattern": "^[A-Za-z][A-Za-z0-9_]{0,31}$",
      +  "type": "string"
      +}
  2. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

The annotations already establish that this is a read-only, non-destructive operation. The description adds meaningful behavioral context: results are bounded and visibility-scoped, disabled users are included unless enabled is explicitly set, and catalog membership is not the same as effective record access.

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 three short sentences with the core operation front-loaded. Every sentence contributes useful information, and there is no redundant restatement of the tool name or schema.

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

Completeness4/5

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

For a 13-parameter query tool, the description covers purpose, visibility bounds, filter intent, and the important catalog-versus-effective-permission distinction. It relies on the detailed schema for alias and pagination semantics, which is reasonable given the high schema coverage.

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?

The schema has 77% description coverage and documents most parameters, including aliases and paging bounds. The description adds filter intent for ID, name, and business unit plus the enabled-user caveat, but it does not explain alias handling, maxPages semantics, or environment_profile.

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

Purpose4/5

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

The description states a specific verb and resource set: reading visible users, teams, or roles with optional filters. It clearly identifies the operation but does not explicitly differentiate it from nearby security-context siblings such as get_principal_security_context or get_record_access.

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

Usage Guidelines3/5

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

Usage is implied for catalog-style principal lookups, and the description adds a useful caution that catalog entries do not imply effective record permissions. However, it does not name an alternative tool to use when effective permissions are needed, leaving the when-not guidance incomplete.

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

Deploy Server

Other Tools