add-data-source
Guide the user to add a data source, connection, or API connector to a Canvas App via Power Apps Studio, then verify and continue. USE WHEN the user asks to…
Use when the user asks to "set up authentication", "add login", "add logout", "add sign in", "enable auth", "add role-based access", "add authorization", "protect routes", "configure identity provider", "configure Entra ID", "configure Entra External ID", "configure OpenID
$ npx -y skills add microsoft/power-platform-skills --skill setup-auth --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/setup-authContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when the user asks to "set up authentication", "add login", "add logout", "add sign in", "enable auth", "add role-based access", "add authorization", "protect routes", "configure identity provider", "configure Entra ID", "configure Entra External ID", "configure OpenID
name: setup-auth description: > Use when the user asks to "set up authentication", "add login", "add logout", "add sign in", "enable auth", "add role-based access", "add authorization", "protect routes", "configure identity provider", "configure Entra ID", "configure Entra External ID", "configure OpenID Connect", "add OIDC", "set up SAML", "set up WS-Federation", "set up local login", "add Facebook login", "add Google sign in", "add Microsoft Account", or otherwise wants to set up authentication (login/logout) and role-based authorization for their Power Pages code site using any supported identity provider. Also sets up the IdP app registration for OIDC providers (Okta, Auth0, Entra External ID, and other OIDC) -- reads the provider's docs first, then either guides the user through the provider's console or, when the provider supports it, configures it for the user -- and wires the client ID, authority, and claims mapping into Power Pages. user-invocable: true allowed-tools: Read, Write, Edit, Bash, Grep, Glob, AskUserQuestion, Task, TaskCreate, TaskUpdate, TaskList, Skill, mcp__plugin_power-pages_microsoft-learn__microsoft_docs_search, mcp__plugin_power-pages_microsoft-learn__microsoft_docs_fetch model: opus
> **Plugin check**: Run `node "${PLUGIN_ROOT}/scripts/check-version.js"` — if it outputs a message, show it to the user before proceeding.
Configure authentication (login/logout) and role-based authorization for a Power Pages code site. This skill supports multiple identity providers -- Microsoft Entra ID, Entra External ID (for customer-facing apps with self-service sign-up), OpenID Connect (Okta, Auth0, etc.), SAML2, WS-Federation, local authentication (username/password), Microsoft Account, Facebook, and Google. It also supports optional features including invitation-based registration and Terms & Conditions acceptance. Power Pages built-in 2FA is intentionally not scaffolded because the SendCode/VerifyCode pages are server-rendered and cannot be integrated into a SPA experience — use IdP-level MFA instead. It creates an auth service, type declarations, authorization utilities, auth UI components, and role-based access control patterns appropriate to the site's framework and chosen identity provider(s).
**Initial request:** $ARGUMENTS
> **Prerequisites:** > > - An existing Power Pages code site created via `/create-site` > - The site must be deployed at least once (`.powerpages-site` folder must exist) > - Web roles must be created via `/create-webroles`
1. **Phase 1: Check Prerequisites** — Verify site exists, detect framework, check web roles 2. **Phase 2: Plan** — Gather auth requirements (optionally set up the IDP app registration knowledge-first — Guided by default, or configure-for-you via the provider's own CLI where supported: Okta / Auth0 / Entra External ID) and present plan for approval 3. **Phase 3: Create Auth Service** — Auth service with login/logout and type declarations 4. **Phase 4: Create Authorization Utils** — Role-checking functions and wrapper components 5. **Phase 5: Create Auth UI** — Login/logout button integrated into navigation 6. **Phase 6: Implement Role-Based UI** — Apply role-based patterns to site components 7. **Phase 7: Verify Auth Setup** — Validate all auth files exist, build succeeds, auth UI renders 8. **Phase 8: Review & Deploy** — Summary and deployment prompt
---
**Goal:** Confirm the project exists, identify the framework, verify deployment status and web roles, and check for existing auth code.
Look for `powerpages.config.json` in the current directory or immediate subdirectories:
**/powerpages.config.json
**If not found**: Tell the user to create a site first with `/create-site`.
Read `package.json` to determine the framework (React, Vue, Angular, or Astro). See `${PLUGIN_ROOT}/references/framework-conventions.md` for the full framework detection mapping.
Look for the `.powerpages-site` folder:
**/.powerpages-site
**If not found**: Tell the user the site must be deployed first:
> "The `.powerpages-site` folder was not found. The site needs to be deployed at least once before authentication can be configured."
<!-- gate: setup-auth:1.3.deploy-first | category=plan | cancel-leaves=nothing -->
> 🚦 **Gate (plan · setup-auth:1.3.deploy-first):** `.powerpages-site` missing — auth setup writes site settings inside that folder. Deploy first or stop. > > **Trigger:** Phase 1.3 detected no `.powerpages-site` folder. > **Why we ask:** Auto-deploy picks the wrong env; skipping leaves auth wiring broken. > **Cancel leaves:** Nothing — no auth files written yet.
Use `AskUserQuestion`:
| Question | Options | |----------|---------| | Your site needs to be deployed first. Would you like to deploy now? | Yes, deploy now (Recommended), No, I'll do it later |
**If "Yes, deploy now"**: Invoke `/deploy-site`, then resume.
**If "No"**: Stop — the site must be deployed first.
Look for web role YAML files in `.powerpages-site/web-roles/`:
**/.powerpages-site/web-roles/*.yml
Read each file and compile a list of existing web roles (name, id, flags).
<!-- gate: setup-auth:1.4.create-webroles | ca
Official agent skills/plugins for Power Platform development by Microsoft.
Repo: microsoft/power-platform-skills
Guide the user to add a data source, connection, or API connector to a Canvas App via Power Apps Studio, then verify and continue. USE WHEN the user asks to…
Creates or edits a Power Apps Canvas App through the Canvas Authoring MCP coauthoring session. Handles new app generation, direct targeted edits, complex…
Configure the Canvas Authoring MCP server for the current coauthoring session. USE WHEN "configure MCP", "set up MCP server", "MCP not working", "connect…
Use this skill when the user wants to "report a bug", "file an issue", "report an issue", "submit a bug report", or report any problem with the canvas-apps…
Adds Azure DevOps connector to a Power Apps code app. Use when querying work items, creating bugs, managing pipelines, or making ADO API calls.
Adds any Power Platform connector to a Power Apps code app. Generic fallback for connectors not covered by a specific skill.