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.
- 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, clickStart from blank. - You can leave the default values at this stage, or choose temporary values for your site name and web address.
- Click
Doneto provision the website. This may take a while to complete. - Once created, verify that the website is listed under
Power Pages sitesin the Power Platform Admin Center.
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.
- Go to Power Pages.
- Select the correct Dynamics 365 environment from the environment selector in the top right.
- Click the ellipsis (...) next to your recently installed website, then select
Power Pages Management. - In the Power Pages Management app, go to
Websiteswhere you should see the website record for your blank site. - Delete the website record. This removes all associated metadata (web pages, entity lists, forms), leaving the model-driven app blank.
- 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.
- Return to Power Pages and delete the website from the sites list.
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 (opens in new tab) 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 clickRegister. - In the app registration, go to
API permissions>Add a permission>Dynamics CRM. - Select
Delegated permissions, checkuser_impersonation, and clickAdd permissions. - Go to
Certificates & secrets>New client secret. Provide a description (e.g. "GitHub Action Secret"), choose an expiration period, and clickAdd. 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 (opens in new tab).
- Navigate to
Environments, then select your Dynamics 365 environment. - Go to
Settings>Users + permissions>Application users, then click+ New app user. - Click
+ Add an appand enter the app registration's Client ID in the search bar. - Select the app and click
Add. - Complete the remaining details:
Business unit: Select your organisation's default business unit.Security roles: Assign the System Administrator role.
- Click
Create.