Skip to main content
Glama
Dynamics 365 MCP Server

Dynamics 365 MCP Server

by Kenny-666

get_principal_security_context

Read-only

Read a user or team profile with direct roles and visible team memberships, preserving partial or forbidden sources; use get_record_access for native record-level rights.

Instructions

Read a user/team profile, direct roles and bounded visible team memberships/roles. Preserves partial/forbidden sources and business-unit role identities. Does not reconstruct all inherited/group/shared/field privileges; use get_record_access for native record rights.

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": "get_principal_security_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
roleLimitNoCompatibility alias for role_limit; conflicting values are rejected.
teamLimitNoCompatibility alias for team_limit; conflicting values are rejected.
role_limitNoMaximum role rows per direct/team source, default 50.
team_limitNoMaximum visible teams, default 10.
principalIdNoCompatibility alias for principal_id; conflicting values are rejected.
principal_idNo
principalTypeNoCompatibility alias for principal_type; conflicting values are rejected.
principal_typeNoDefault systemuser. Without a systemuser ID, inspects the current authenticated user.
includeTeamRolesNoCompatibility alias for include_team_roles; conflicting values are rejected.
include_team_rolesNoRead roles for visible user teams, default true.
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

A4.6/5.0
Behavior4/5

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

Beyond the read-only and non-destructive annotations, it discloses bounded visibility, preservation of partial/forbidden sources and business-unit role identities, and an important completeness limitation. It does not explain how partial or forbidden sources are represented in the response, leaving some behavioral detail unclear.

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?

Three compact sentences front-load the operation and scope, then cover response-preservation behavior and the key exclusion with its alternative. Every sentence contributes actionable information without filler or repetition of schema defaults.

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?

Together with the richly described schema, the definition is sufficient for safe invocation and communicates the most important security-scope limitations. Because there is no output schema, the ambiguous phrase 'Preserves partial/forbidden sources' leaves some response semantics unspecified, and the description does not differentiate the tool from query_security_principals or get_current_user_context.

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

Parameters4/5

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

With 91% schema description coverage, the schema already documents defaults, limits, aliases, and environment selection. The description adds useful semantic context by connecting principal types to user/team inspection and team-role options to bounded visible output, though it adds no further syntax or constraint details.

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 opening sentence gives a specific read operation and enumerates its resources: user/team profile, direct roles, and bounded visible team memberships/roles. The final sentence distinguishes it from full privilege reconstruction and from the sibling get_record_access tool.

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

Usage Guidelines5/5

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

It explicitly warns against using the tool to reconstruct inherited, group, shared, or field privileges. It also provides a concrete alternative, directing native record-rights questions to get_record_access, which addresses a likely selection error.

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