setup-auth

Automate authentication and authorization scaffolding for Power Pages code sites.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This skill automates and scaffolds the setup of authentication and authorization for Power Pages code sites, simplifying integration with Microsoft Entra ID and role-based access control.

Core Features & Use Cases

  • Auto-generates an end-to-end authentication service (including type declarations, hooks/composables, and utilities) and framework-specific patterns for React, Vue, Angular, or Astro.
  • Sets up role-based access utilities and UI components to enforce client-side authorization patterns aligned with server-side security.
  • Real-world scenario: you want users to sign in via Entra ID and restrict admin-only sections to Administrators, while providing mock data for local development.

Quick Start

Run the authentication scaffolding in your Power Pages project to enable sign-in, sign-out, and role-based UI flows.

Frequently Asked Questions about setup-auth

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

FAQPage Schema
How do I configure Entra ID authentication for a Power Pages site?

Configuring Entra ID authentication involves scaffolding an auth service with type declarations, hooks, and utilities for Power Pages, then applying the site setting to disable profile redirects after login.

Can I set up role-based access control (RBAC) across different frontend frameworks in Power Pages?

Yes, RBAC setup supports React, Vue, Angular, and Astro by generating framework-specific patterns, UI components, and role utilities to enforce client-side authorization aligned with server-side security.

What is the best way to mock Entra ID authentication during local development?

Mocking Entra ID authentication locally requires using generated mock data within the scaffolded auth service, allowing you to test sign-in, sign-out, and role-based UI flows without a live connection.

Does the Power Pages authentication scaffolding include UI components for access control?

Yes, the scaffolding includes UI components and role utilities designed to enforce client-side access controls, enabling you to restrict sections like admin-only areas to specific roles such as Administrators.

Why do I need to disable profile redirects after login in Power Pages?

Disabling profile redirects after login is a necessary site configuration to prevent the default Power Pages behavior from interrupting custom frontend authentication flows and single-page application routing.