add-ai-webapi

Integrates Power Pages generative-AI summarization APIs into SPA sites with CSRF-handled service code.

808|167|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/microsoft/power-platform-skills --skill add-ai-webapi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-ai-webapi
Source: https://github.com/microsoft/power-platform-skills/tree/main/plugins/power-pages/skills/add-ai-webapi
Command: npx skills add https://github.com/microsoft/power-platform-skills --skill add-ai-webapi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Adding AI-generated summaries to a Power Pages Single Page Application requires coordinating Web API site settings, table permissions, web roles, CSRF-authenticated service code, and Summarization site settings across multiple layers — a manual process that is error-prone and easy to misconfigure.

Core Features & Use Cases

  • Search Summary API integration: Wires /_api/search/v1.0/summary into custom search pages with citation parsing, disabled-state detection, and SPA citation-URL rewriting.
  • Data Summarization API integration: Generates record-level and list-level summary calls against /_api/summarization/data/v1.0/ with correct $select/$expand scoping mirrored from existing fetches.
  • Layered delegation: Delegates Web API settings and table permissions to /integrate-webapi and web roles to /create-webroles, then registers AI prompts via the ai-webapi-settings-architect agent.
  • Use Case: A maker wants an AI-generated case summary with recommendations on a support-case detail page in their React Power Pages site; the skill generates the service code, prompt site settings, and permissions end to end.

Quick Start

Ask the agent to add an AI summary of cases to your Power Pages site's case detail page using the add-ai-webapi skill.

Frequently Asked Questions about add-ai-webapi

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add an AI summary to a Power Pages SPA page?

Use the Data Summarization API by posting to /_api/summarization/data/v1.0/<entitySet>(<id>) with an InstructionIdentifier body, or the Search Summary API at /_api/search/v1.0/summary for search pages. This skill generates the CSRF-handled service code and required site settings automatically.

What is the difference between the Search Summary and Data Summarization APIs?

Search Summary summarizes search results for a user query and requires form-urlencoded content plus the Copilot workspace toggle. Data Summarization summarizes a specific Dataverse record or collection using JSON bodies and per-table Web API settings plus Summarization site settings.

Why does the Power Pages AI summary endpoint return a disabled error?

Both APIs are gated by a three-level admin hierarchy: the tenant PowerShell setting enableGenerativeAIFeaturesForSiteUsers, Copilot Hub environment governance, and the site-level maker toggle. Each level overrides the one below it, so an admin-level disable wins even when the maker toggle is on.

Does the Search Summary API accept JSON request bodies?

No. The Search Summary API requires Content-Type application/x-www-form-urlencoded; sending application/json returns a 400 error. The Data Summarization API is the opposite and requires a JSON body.

When should I not use this skill for AI summaries?

Do not use it for generative pages in model-driven apps, Copilot Studio chatbots, document or PDF summarization, Power BI dashboards, plain keyword search without AI, or plain Dataverse CRUD. Sites using only the built-in Power Pages search control just need the Copilot workspace toggle instead.