TenantAtlas/specs/112-list-expand-parity/contracts/graph-client-listPolicies-options.schema.json
ahmido 32c3a64147 feat(112): LIST $expand parity + Entra principal names (#136)
Implements LIST `$expand` parity with GET by forwarding caller-provided, contract-allowlisted expands.

Key changes:
- Entra Admin Roles scan now requests `expand=principal` for role assignments so `principal.displayName` can render.
- `$expand` normalization/sanitization: top-level comma split (commas inside balanced parentheses preserved), trim, dedupe, allowlist exact match, caps (max 10 tokens, max 200 chars/token).
- Diagnostics when expands are removed/truncated (non-prod warning, production low-noise).

Tests:
- Adds/extends unit coverage for Graph contract sanitization, list request shaping, and the EntraAdminRolesReportService.

Spec artifacts included under `specs/112-list-expand-parity/`.

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #136
2026-02-25 23:54:20 +00:00

41 lines
1.7 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "GraphClientInterface::listPolicies options",
"type": "object",
"additionalProperties": true,
"properties": {
"select": {
"description": "Optional $select. Accepts comma-separated string or array of strings. Sanitized against contract allowed_select.",
"oneOf": [
{ "type": "string" },
{ "type": "array", "items": { "type": "string" } }
]
},
"expand": {
"description": "Optional $expand. Accepts comma-separated string or array of strings. For string input, splitting is top-level only (commas inside balanced parentheses are not separators). Sanitized against contract allowed_expand.",
"oneOf": [
{ "type": "string" },
{ "type": "array", "items": { "type": "string" } }
]
},
"filter": { "type": "string", "description": "Optional $filter." },
"top": { "type": "integer", "minimum": 1, "description": "Optional $top." },
"platform": { "type": "string", "description": "Optional platform filter (contract-specific)." },
"client_request_id": { "type": "string", "description": "Optional client request id for Graph correlation." },
"tenant": { "type": "string", "description": "Optional tenant override (primarily for diagnostics/commands)." },
"access_token": { "type": "string", "description": "Optional delegated access token override." },
"client_id": { "type": "string" },
"client_secret": { "type": "string" },
"scope": {
"description": "Optional scope override.",
"oneOf": [
{ "type": "string" },
{ "type": "array", "items": { "type": "string" } }
]
},
"token_url": { "type": "string" }
}
}