Data Bear

Deploy Website to Power Pages: Claude Code Guide

Power BI Sharing

In modern data-driven organizations, combining web applications with Microsoft’s Power Platform unlocks powerful possibilities. In this guide, we’ll walk through how to deploy a custom website to Power Pages using Claude Code, even if you’re not a professional developer.

This tutorial builds on a previous setup where a sample service request website was created. Now, we’ll take that locally hosted app and deploy it to a live, hosted environment using Power Pages.

Bonus Resource:
Check out this training for deeper Power BI and PowerPlatfo rm skills

Deploy Website to Power Pages: Claude Code Guide
Prerequisites

Before starting, make sure you have:

  • A working website (built in previous steps)
  • Access to Power Platform
  • Visual Studio Code installed
  • Power Platform CLI (PAC CLI) configured
  • A connected tenant and environment
  • Claude Code extension (or equivalent AI coding assistant)
Why Deploy to Power Pages?

Deploying your website to Power Pages allows you to:

  • Host your app securely in Microsoft’s ecosystem
  • Share access with internal or external users
  • Integrate with Dataverse and other Power Platform tools
  • Move from local development to production-ready infrastructure
Step 1: Prepare Your Deployment Commands

Start by copying your deployment script (usually provided in documentation or a Word file). This includes commands such as:

  • /create site
  • /deploy site
  • /activate site

Before running:

  • Update your email address
  • Confirm your Power Platform environment
Step 2: Configure Power Platform in VS Code

Inside Visual Studio Code:

  1. Open the Power Platform panel
  2. Ensure the correct tenant is selected (star it if needed)
  3. Expand your environment (e.g., April Test Environment)
  4. Verify everything is correctly configured

This ensures your deployment targets the right location.

Step 3: Run the Deployment Command

Execute your deployment command (e.g., /deploy site).

What Happens Behind the Scenes?
  • Authentication via PAC CLI
  • Environment validation
  • Site creation and configuration
  • Upload of assets (HTML, CSS, JavaScript)
  • Continuous prompts asking for permission (expect multiple confirmations)

Tip: You can run commands in a terminal to avoid repeated prompts.

Step 4: Monitor the Deployment Process

The deployment process:

  • Takes about 5 minutes on average
  • Modifies your site structure for Power Pages compatibility
  • Updates headers, footers, and configuration files
  • Uploads required assets

You’ll see a diff view:

  • Red = old code
  • Green = updated code
Step 5: Enable CSS & JavaScript Uploads

During deployment, you’ll be asked to allow:

  • CSS file uploads
  • JavaScript file uploads

This is required for deployment but does not mean end users can upload scripts it’s strictly for setup.

Step 6: Activate the Power Pages Site

After deployment:

  1. Navigate to your Power Pages environment
  2. Look under Inactive Sites
  3. Find your deployed portal
  4. Click Activate

Alternatively, use:

/activate site
Important Notes:
  • Activation may take 2–3 minutes
  • You may encounter prompts or minor errors follow through
  • Azure CLI may need to be installed if not already present
Step 7: Azure App Registration Setup

During activation:

  • An Azure App Registration is created
  • This enables authentication and security
  • Requires appropriate permissions in your tenant

If you lack permissions, deployment may fail contact your admin.

Step 8: Configure Site URL

You’ll be prompted to:

  • Choose a system-generated URL
  • Or create a custom one

Best Practice:

  • Use a meaningful and unique name
  • Remember: URLs must be globally unique across Microsoft
Step 9: Wait for Site Provisioning

Even after activation:

  • The site may show “Service Unavailable”
  • This is normal Power Pages is still provisioning

Typical delay: 5–10 minutes

Step 10: Understand Power Pages Limitations

Once deployed, your site behaves differently:

Key Differences:
  • It becomes a Single Page Application (SPA)
  • No page-level editing inside Power Pages UI
  • Styling and structure are managed externally
  • Limited visual editor functionality
Step 11: Configure Security & Access

By default:

  • The site is private
  • Only authorized users can access it

To grant access:

  1. Go to Security Settings
  2. Add users manually
  3. Ensure they exist in your environment
Step 12: First-Time Authentication Consent

On first access:

  • Admin must approve permissions
  • Allows reading from Microsoft Entra ID (Azure AD)

This enables:

  • User authentication
  • Access control
  • Role-based visibility
Step 13: Verify Deployment

Once everything completes:

  • Your site will load successfully
  • It will look the same as your local version
  • You can now share it with users

You can also:

  • Test multilingual features
  • Simulate login experiences
  • Validate UI behavior
What’s Next? Add Dataverse Integration

In the next phase, you should:

  • Create Dataverse tables
  • Load sample data
  • Connect your frontend to real data
  • Package everything into a deployable solution

This transforms your app from a static UI into a fully functional business application.

Key Takeaways
  • Power Pages enables rapid deployment of web apps into Microsoft’s ecosystem
  • Claude Code + Power Platform CLI streamline the process
  • Expect delays during provisioning this is normal
  • Azure integration is essential for authentication
  • Your app becomes production-ready after activation
Final Thoughts

Deploying a website to Power Pages might seem complex at first, but with the right tools and guidance, it becomes a structured and repeatable process.

Whether you’re building internal tools or customer-facing portals, this approach gives you scalability, security, and seamless integration with Power Platform.

Want to go deeper into Power BI and Power Platform?