Skip to content

Cache MCP service principals during tenant setup - #198

Open
kgorinsh wants to merge 1 commit into
microsoft:mainfrom
kgorinsh:perf/cache-mcp-service-principals
Open

Cache MCP service principals during tenant setup#198
kgorinsh wants to merge 1 commit into
microsoft:mainfrom
kgorinsh:perf/cache-mcp-service-principals

Conversation

@kgorinsh

@kgorinsh kgorinsh commented Sep 9, 2026

Copy link
Copy Markdown

Summary

  • cache MCP service principals as they are discovered or created during tenant provisioning
  • reuse the cached objects when granting admin consent
  • preserve on-demand lookup behavior for -ConsentOnly

Performance

The normal provisioning path now performs 12 service-principal queries instead of 22, eliminating 10 sequential Microsoft Graph round trips.

Validation

  • parsed the script with the PowerShell AST parser
  • exercised mocked standard and -ConsentOnly paths
  • confirmed both paths issue 12 service-principal queries

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant