Pre-requisites

Complete the following steps to ensure your environment is correctly configured. These steps install necessary components and prepare your Dynamics 365 environment for a custom Power Pages website.

You will:

  • install Power Pages solutions and tables in your Dynamics 365 environment
  • set up an app registration in the Azure Portal and configure its permissions in Dynamics 365

Before starting, ensure you have:

  • System Administrator role in your Dynamics 365 environment
  • access to the Azure Portal with permissions to create app registrations in the Department for Education directory

Install a blank site from Power Pages

Installing a blank site in Power Pages ensures that all necessary solutions, tables, and fields are installed in your Dynamics 365 environment. This provides a foundation for your website.

  1. Go to Power Pages.
  2. Select the correct Dynamics 365 environment from the environment selector in the top right.
  3. Under Other ways to create a site, click Start from blank.
  4. You can leave the default values at this stage, or choose temporary values for your site name and web address.
  5. Click Done to provision the website. This may take a while to complete.
  6. Once created, verify that the website is listed under Power Pages sites in the Power Platform Admin Center.
The blank site installs solutions and related tables for the enhanced Power Pages model.

Delete blank site records

The blank site installation creates website content (website record, web pages, entity lists, forms, etc.) in the Power Pages Management model-driven app. To start with a completely custom website, you must delete these records.

  1. Go to Power Pages.
  2. Select the correct Dynamics 365 environment from the environment selector in the top right.
  3. Click the ellipsis (...) next to your recently installed website, then select Power Pages Management.
  4. In the Power Pages Management app, go to Websites where you should see the website record for your blank site.
  5. Delete the website record. This removes all associated metadata (web pages, entity lists, forms), leaving the model-driven app blank.
  6. Verify that no website records or content remain by checking other record types in the Power Pages Management app. The previous step does not always delete all records.
  7. Return to Power Pages and delete the website from the sites list.
Do not delete the Power Pages Management app itself, as it is required for managing your website.

Create app registration in Azure Portal

You need to create an app registration in the Azure Portal to allow the GitHub action to interact with your Dynamics 365 environment.

  1. Sign in to the Azure Portal (opens in new tab) and ensure you are in the Department for Education directory.
  2. In the search bar at the top of the screen, search for and select Microsoft Entra ID.
  3. In the left navigation, go to Manage > App registrations, then click + New registration.
  4. Enter a name for the app (e.g. "[Your Service] Power Pages Setup App"), select Accounts in this organizational directory only, and click Register.
  5. In the app registration, go to API permissions > Add a permission > Dynamics CRM.
  6. Select Delegated permissions, check user_impersonation, and click Add permissions.
  7. Go to Certificates & secrets > New client secret. Provide a description (e.g. "GitHub Action Secret"), choose an expiration period, and click Add. Copy the secret value immediately.
The client secret will be hidden after you navigate away, so copy it now and store it securely.

Add application user in Dynamics 365

Add the app registration as an application user in your Dynamics 365 environment and grant it the System Administrator security role.

  1. Sign in to the Power Platform Admin Center (opens in new tab).
  2. Navigate to Environments, then select your Dynamics 365 environment.
  3. Go to Settings > Users + permissions > Application users, then click + New app user.
  4. Click + Add an app and enter the app registration's Client ID in the search bar.
  5. Select the app and click Add.
  6. Complete the remaining details:
    • Business unit: Select your organisation's default business unit.
    • Security roles: Assign the System Administrator role.
  7. Click Create.