Pre-requisites
Complete the following pre-requisite steps to ensure your environment is correctly configured. These steps install necessary components, and provide a clean slate for your website and prepare the Dynamics 365 environment.
You will:
- install website configuration components in your Dynamics 365 environment
- set up an app registration in the Azure Portal and configure it's permissions in your Dynamics 365 environment
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.
- Go to Power Pages.
- Select the correct Dynamics 365 environment from the environment selector in the top right.
- Under Other ways to create a site click Start from blank.
- You can leave the default values at this stage, or choose temporary values for your site name and web address.
- Click Done to provision the website. This may take a while to complete.
- Once created, verify that the website is listed under Power Pages sites in the Power Platform Admin Center.
Delete blank site records to ensure an empty Power Pages Management model-driven app
The blank site install will include website content (e.g. 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 all the visible records.
- Go to Power Pages.
- Select the correct Dynamics 365 environment from the environment selector in the top right.
- Click the elipsis against your recently installed active website, then select Power Pages Management.
- In the Power Pages Management app, go to Websites where you should see the website record for your blank site.
- Delete the website record. This will remove all associated metadata (e.g., web pages, entity lists, forms), leaving the model-driven app blank.
- The previous step does not always ensure a complete deletion of records. Verify that no website records or content remain by checking the other record types in the Power Pages Management app.
- Return to Power Pages and delete the website record associated with the blank site.
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.
- Sign in to the Azure Portal and ensure you are in the Department for Education directory.
- In the search bar at the top of the screen, search for and select Microsoft Entra ID
- In the left navigation, go to Manage > App registrations, then click + New registration
- Enter a name for the app (e.g. "[Your Service] Power Pages Setup App"), select Accounts in this organizational directory only and click Register.
- In the app registration, go to API permissions > Add a permission > Dynamics CRM.
- Select Delegated permissions, check user_impersonation, and click Add permissions
- Go to Certificates & secrets > New client secret. Provide a description (e.g., "GitHub Action Secret"), choose an expiration date, and click Add. Copy the secret value immediately.
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.
- Sign in to the Power Platform Admin Center
- Navigate to Manage > Environments, then select your Dynamics 365 environment
- Go to Settings > Users + permissions > Application users > New app user
- Select Add an app and enter the App Registration's Client ID in the search bar
- Select the app and click Add.
- Complete the remaining details:
- Business unit: Usually the default business unit and can often be found and selected by entering a vowel to trigger the search dropdown.
- Security role: Assign the System Administrator permission to the app
- Click Create
Next steps
Once these pre-requisites are complete, you can import your website template.
For more detailed guidance, refer to the Power Pages documentation or the Dynamics 365 documentation.