Creates and configures web roles for a Power Pages code site. Web roles control access and permissions for site users, including authenticated and anonymous roles. Use when the user wants to create, add, set up, or manage web roles for their site.
Copy the install command and let the AI configure it · recommended for beginners
Please install the "create-webroles" skill from askskill: 1. Download https://raw.githubusercontent.com/microsoft/power-platform-skills/main/plugins/power-pages/skills/create-webroles/SKILL.md 2. Save it as ~/.claude/skills/create-webroles/SKILL.md 3. Reload skills and tell me it's ready
Plugin check: Run
node "${CLAUDE_PLUGIN_ROOT}/scripts/check-version.js"— if it outputs a message, show it to the user before proceeding.
Create web roles for a Power Pages code site. Web roles define the permissions and access levels for different types of site users.
${CLAUDE_PLUGIN_ROOT}/scripts/generate-uuid.js to produce valid UUID v4 values for each web role.anonymoususersrole: true and only one can have authenticatedusersrole: true. Always check existing roles before setting these flags.Prerequisite: The site must be deployed at least once before web roles can be created, since deployment creates the
.powerpages-sitefolder structure that stores web role definitions.
Initial request: $ARGUMENTS
.powerpages-site/web-roles/ directoryGoal: Confirm the .powerpages-site/web-roles/ directory exists and is ready for web role files
Actions:
Locate the project root (**/powerpages.config.json) and check for .powerpages-site/web-roles/.
If .powerpages-site does NOT exist: Ask the user to deploy first via AskUserQuestion (options: "Yes, deploy now (Recommended)", "No, I'll do it later"). If yes, invoke /deploy-site then resume from Phase 2. If no, stop.
If .powerpages-site exists but web-roles/ does NOT: Create the <PROJECT_ROOT>/.powerpages-site/web-roles/ directory.
If both exist: Proceed to Phase 2.
Output: Confirmed .powerpages-site/web-roles/ directory exists and is ready
Goal: Identify all web roles already defined for the site
Actions:
Read all YAML files in the .powerpages-site/web-roles/ directory. Each file represents one web role with this format:
anonymoususersrole: false
authenticatedusersrole: false
id: 778fa3d0-a2ef-4d2b-98b8-e6c7d8ce1444
name: Administrators
Parse each file and compile a list of existing web roles (name, id, and flags).
Present the existing roles to the user:
"I found the following existing web roles in your site:"
- Administrators (id:
778fa3d0-..., authenticated: false, anonymous: false)- (etc.)
If no roles exist yet, inform the user:
"No web roles are currently defined for your site."
Output: Complete list of existing web roles with their names, IDs, and flags
Goal: Decide which new web roles to create based on site needs and user input
Actions:
Based on the site's purpose and the existing roles, suggest appropriate web roles. Use AskUserQuestion to confirm with the user.
Common web roles for Power Pages sites include:
authenticatedusersrole: true)anonymoususersrole: true)…
Integrate Power Automate cloud flows into Power Pages with generated metadata and code.
Set up Power Platform Pipelines for automated Power Pages deployments.
Review and fix Power Pages security headers, CSP, CORS, cookies, and embedding settings.
Run an end-to-end Power Pages security review with a consolidated HTML report.
Test deployed Power Pages sites with browsing, crawling, and API verification.
Create and execute a reviewable ALM plan for Power Pages deployments.