Creating Sites Using Copilot

Earn 25 points (50 with Pro) in two steps

  1. ① Read through the lesson — each section gets a ✓ as you scroll through it.
  2. ② When every section has a ✓, tap Complete lesson.

0 of 11 read · keep scrolling

✦ See fewer ads and earn double points — 50 a lesson instead of 25 — with Pro

Lesson: Creating Power Pages Sites Using Copilot

Introduction to AI-Assisted Site Development

In the modern landscape of web development, the barrier to entry for creating professional-grade business websites is shifting rapidly. Power Pages, a component of the Microsoft Power Platform, has introduced Copilot—a generative AI assistant—to fundamentally change how we build sites. Historically, creating a website meant navigating complex site maps, manually configuring authentication, and spending hours on basic styling. Today, Copilot allows developers and business users alike to describe their vision in plain language and have the system generate the foundational structure of a site in minutes.

Understanding how to use Copilot for site creation is not just about saving time; it is about changing your workflow from "building from scratch" to "curating and refining." By allowing the AI to handle the boilerplate code and initial data modeling, you can focus your expertise on business logic, security, and user experience. This lesson explores the mechanics of using Copilot to generate sites, the underlying processes it triggers, and how to effectively transition from AI-generated drafts to production-ready applications.

Not read yet

The Paradigm Shift: From Manual Configuration to Generative Design

When you create a site using traditional methods, you typically start with a blank template, manually connect data tables, and build out forms one by one. With Copilot, you begin with a prompt. The AI analyzes your intent, suggests a site map, creates relevant Dataverse tables, and builds a homepage that is contextually aware of the purpose of your site.

This approach is particularly valuable for rapid prototyping. If you are working with a client who needs a portal for tracking volunteer hours, you no longer need to sketch out the database schema on a whiteboard for hours. You can describe the requirement to Copilot, and it will suggest a schema that includes tables for volunteers, events, and hours tracked. This immediate feedback loop allows stakeholders to see a functional draft of their project in the very first meeting, which drastically improves communication and alignment.

Callout: AI-Assisted vs. Traditional Development Traditional development requires a "top-down" approach where the developer defines the architecture, database, and UI components before writing a single line of code. AI-assisted development using Copilot adopts a "bottom-up" approach where the system proposes an architecture based on natural language, allowing the developer to act as an architect and reviewer rather than a manual laborer.

Not read yet

Step-by-Step Guide: Creating Your First Site with Copilot

To begin building a site with Copilot, you must first ensure you have the appropriate environment access within the Power Pages design studio. Follow these steps to generate your first site:

  1. Access the Power Pages Home: Log into the Power Pages maker portal. On the home screen, you will see a text box labeled "Describe the website you want to create."
  2. Formulate Your Prompt: Be specific. Instead of saying "create a site for a company," say "create a portal for a library where patrons can view their checked-out books and reserve new ones."
  3. Review the Suggested Site Map: Copilot will display a proposed structure for your site, including pages like "My Books," "Reserve," and "Contact Us." You can edit these suggestions or add new ones before proceeding.
  4. Confirm Data Modeling: The system will suggest tables in Dataverse to support the site. Review these to ensure they match your business needs. You can instruct the AI to "add a table for book categories" if something is missing.
  5. Generate the Site: Once you click "Create," the system will provision the environment, create the database tables, and assemble the site pages.

Crafting Effective Prompts

The quality of your site depends heavily on your initial prompt. Think of the prompt as the "brief" you would give a junior developer. A good prompt should include:

  • The Persona: Who is the user? (e.g., "A customer," "An employee," "A vendor.")
  • The Goal: What is the primary task? (e.g., "Requesting time off," "Submitting an expense report.")
  • The Data Context: What information is involved? (e.g., "Expenses linked to a specific project.")

Tip: If the initial site generation isn't perfect, don't delete it. You can use the "Edit with Copilot" feature within the Design Studio to add pages, modify form fields, or change the site theme after the site has been created.

Not read yet

Understanding the Underlying Dataverse Integration

When Copilot generates a site, it is simultaneously generating a Dataverse schema. This is the most critical part of the process because the data model is the heart of any Power Pages application. If you ask for a "Customer Support Portal," Copilot creates tables for "Tickets," "Customers," and "Support Agents" with pre-defined relationships (lookups).

Examining the Data Structure

Once the site is generated, navigate to the "Data" workspace. You will see the tables that Copilot created. You should inspect these tables to verify that the column types are correct. For example, if Copilot created a "Price" field, ensure it is set to the "Currency" data type rather than a simple text field.

Example: Modifying an AI-Generated Table

If the AI creates a table named BookReservation but misses a field for ReservationStatus, you can add it manually:

  1. Open the BookReservation table in the Data workspace.
  2. Click "New Column."
  3. Set the Data Type to "Choice" and define options like "Pending," "Approved," and "Cancelled."
  4. Update the site form to include this new field so users can see their status.

Not read yet

Customizing the AI-Generated UI

After the site is generated, you will likely want to refine the look and feel. Copilot provides a "Theme" workspace where you can apply color palettes and fonts. However, for more granular control, you will need to utilize the CSS editor.

Using Liquid and CSS for Enhancements

While Copilot handles the structure, you may need to add custom logic using Liquid, the template language used by Power Pages. For instance, if you want to display a custom welcome message based on the user's login status, you would use a Liquid snippet in your page header or body.

{% if user %}
    <h1>Welcome back, {{ user.fullname }}!</h1>
{% else %}
    <h1>Welcome to our portal. Please sign in to view your records.</h1>
{% endif %}

This snippet checks if a user object exists. If it does, it greets them by name; otherwise, it displays a generic message. You can inject this code into a "Code Component" or directly into the HTML block of a page within the Design Studio.

Not read yet

Best Practices for AI-Driven Development

While Copilot is a powerful tool, it does not replace the need for architectural oversight. To build sustainable and secure Power Pages sites, follow these industry-standard practices:

  • Validate Permissions Immediately: Copilot creates the site, but it does not automatically configure Table Permissions. You must manually go to the "Set up" workspace and define who can read, write, or create records for every table generated.
  • Iterate, Don't Over-Prompt: It is often better to generate a simple base site and use the Design Studio to refine the UI than to try to get a single prompt to generate a highly complex site with 20+ pages.
  • Clean Up Unused Tables: Sometimes, if you experiment with prompts, the AI might create tables that you don't end up using. Regularly audit your Dataverse environment to remove unused tables and keep your database clean.
  • Version Control: Although the Power Pages Design Studio doesn't have a traditional "undo" button for every action, you should use the "Site Actions" feature to create backups or move your configuration to a development environment using the Power Platform CLI (PAC CLI).

Warning: Never assume that the security settings on an AI-generated site are configured for public access. Always audit your Table Permissions and Web Role assignments before publishing your site to the live web.

Not read yet

Common Pitfalls and How to Avoid Them

Even with AI assistance, developers often encounter common roadblocks. Recognizing these early will save you hours of troubleshooting.

1. The "Generic Table" Trap

Copilot sometimes names tables generically, such as "Table1" or "Data." If you don't rename these immediately after generation, you will face significant technical debt when trying to integrate with other Power Platform tools like Power Automate.

  • Solution: Spend 15 minutes after the initial generation to rename tables, columns, and relationships to match your organization's naming conventions.

2. Ignoring Performance

An AI might generate a page that loads data from five different tables simultaneously. If you have thousands of records, this will degrade page performance.

  • Solution: Use the "Performance" tab in your browser's developer tools to check how long your pages take to load. Limit the number of records displayed in lists and use views to filter data effectively.

3. Over-Reliance on AI for Security

Copilot is great at UI and data modeling, but it cannot "know" your specific organizational security requirements.

  • Solution: Treat the AI as a scaffolding tool. Once the scaffolding is up, manually review all authentication and authorization settings.

Not read yet

Comparison: Manual Site Creation vs. Copilot-Assisted

Feature Manual Creation Copilot-Assisted
Initial Setup Hours (manual table creation, page mapping) Minutes (generative design)
Data Modeling Manual schema design AI-suggested schema (customizable)
UI/UX Full control from start AI-generated templates (customizable)
Security Manual configuration Manual configuration (REQUIRED)
Learning Curve Steep Low

Advanced Customization: Beyond the Copilot Interface

Once you have mastered the basics of generating a site, you will eventually reach the limits of what the Copilot interface can do. At this point, you should transition to the "Advanced" view, which allows you to use the Portal Management app (a model-driven app that provides deep access to the site's configuration).

Accessing the Portal Management App

The Portal Management app is where you configure advanced features like:

  • Content Snippets: For managing static text that appears in multiple places.
  • Web Templates: For creating custom page layouts using Liquid and HTML.
  • Site Settings: For configuring global settings like reCAPTCHA keys or site-wide performance tweaks.

When you use Copilot to create a page, it creates a "Web Page" record in the background. You can open this record in the Portal Management app to see the exact configuration, including the "Web Template" associated with it. This is an excellent way to learn how the system works under the hood.

Callout: The Power of the Portal Management App While the Design Studio is perfect for visual updates, the Portal Management app is the "control center" for the entire site. If you find that an AI-generated page isn't behaving as expected, the Portal Management app will show you the underlying metadata, such as the Page Template, Content Page, and localized content strings.

Not read yet

Troubleshooting AI Generation Issues

Sometimes, Copilot may fail to generate a site or produce an error during the process. This is usually due to environment-level restrictions or missing prerequisites.

  • Check Environment Permissions: Ensure you are a System Administrator in the Power Platform environment where you are trying to create the site.
  • Check Feature Availability: Ensure "Copilot" is enabled for your environment in the Power Platform Admin Center.
  • Clear Browser Cache: If the Design Studio feels "stuck," a hard refresh (Ctrl+F5) often resolves issues with the AI interface not loading correctly.

The Future of AI in Power Pages

As AI models evolve, the capabilities of Copilot will move from "site generation" to "intelligent maintenance." We can expect future iterations to offer proactive suggestions for security patches, automated accessibility audits (ensuring your site meets WCAG standards), and even SEO optimization suggestions based on the content of your pages.

By embracing this workflow now, you are positioning yourself as a developer who understands both the speed of AI and the rigor of professional web development. The ability to bridge these two worlds—using AI to build the foundation and your expertise to refine the outcome—is the most valuable skill in the modern Power Platform ecosystem.

Not read yet

Key Takeaways

  1. Copilot as an Accelerator: Copilot is an excellent tool for rapid prototyping and building the foundational structure of a site, allowing you to bypass the manual setup of Dataverse tables and page maps.
  2. The Human-in-the-Loop Requirement: Always perform a manual audit of security, permissions, and database naming conventions after Copilot generates your site; the AI provides a draft, not a finalized production environment.
  3. Data Modeling Matters: The quality of your site depends on the quality of your data model. Use the Data workspace to refine the tables and relationships created by the AI to ensure they align with your business requirements.
  4. Leverage Advanced Tools: Transition from the Design Studio to the Portal Management app when you need to perform deep configuration, such as setting up content snippets or complex Liquid logic.
  5. Iterative Refinement: Don't expect perfection from a single prompt. Use the "Edit with Copilot" feature to refine your site incrementally rather than trying to define the entire project at once.
  6. Security First: Never assume that AI-generated sites are secure by default. You must configure table-level permissions and web roles manually to ensure that sensitive data is protected.
  7. Focus on Customization: Use the AI to handle the "boring" parts of development (standard layouts, basic tables) so you can spend your time on high-value tasks like custom CSS, complex workflows, and user experience design.

Not read yet

Common Questions

Q: Can I use Copilot to add pages to an existing site?

A: Yes, you can use the "Pages" workspace in the Design Studio to add new pages, and the Copilot sidebar will assist you in generating the content and layout for those specific pages.

Q: Does Copilot write secure code?

A: Copilot generates configuration and structure, not arbitrary code. However, it is your responsibility to ensure the settings it generates (like permissions) are appropriate for your security model.

Q: What if I don't like the theme Copilot chose?

A: You can change the theme at any time using the "Styling" workspace. Copilot provides a starting point, but you have full control over colors, fonts, and button styles.

Q: Can I delete the tables Copilot created?

A: Yes, you can delete them in the Data workspace, but be aware that any pages or forms that depend on those tables will break. Always check for dependencies before deleting any table.

By following this guide, you will be well-equipped to leverage the power of AI in your Power Pages projects, ensuring that you build professional, secure, and highly functional sites with maximum efficiency. Remember that technology is a tool, and your role as a developer remains the most important part of the creation process—the AI is your partner, but you are the architect.

Not read yet

Each section gets a ✓ as you scroll through it. Tap the button to jump to the next one.