Set up your lab environment

Use one dedicated Power Platform lab environment with Microsoft Dataverse for the whole course. In this guide, you set up the environment, turn on code apps, install the tools, sign in to GitHub and GitHub Copilot, and import the base solution and sample data. Complete this guide before you start lab 01.

This exercise should take approximately 30 minutes to complete.

Set up a Dataverse lab environment

If your instructor or administrator provides a dedicated environment, use it instead of creating one. Confirm that it has Dataverse, that your lab account has the System Administrator security role, and that your account is licensed to run the apps and flows. Don't use your tenant's default or a production environment.

Otherwise, create a standard Trial environment. Use a work or school account with a license that permits standard trial creation{:target="_blank"}. If you don't have an eligible license, you can try the Power Apps trial{:target="_blank"} if your tenant allows it. If trial signup or environment creation is blocked, ask your instructor or administrator to provide a lab environment.

  1. Sign in to the Power Platform admin center{:target="_blank"} at https://admin.powerplatform.microsoft.com, select Manage > Environments, and then select New.
  2. Set Type to Trial (not Trial (subscription-based)), choose a Macro Region Geography, and enter a name, such as AB-400 labs.
  3. Expand Change default settings. Leave Make this a Managed Environment set to No, set Add a Dataverse data store? to Yes, and select Next.
  4. Choose a language and currency. Under Security group, select the group your administrator specifies for the lab, or select None if your tenant permits open access across the tenant. Leave Deploy sample apps and data? set to No. Select Save and wait for provisioning to finish.

In Manage > Environments, confirm the environment is Ready and has a Dataverse database. If you created it using the steps above, confirm Type is Trial. A standard trial{:target="_blank"} lasts 30 days. Check Day(s) remain in the environment details and export any work you want to keep before it expires.

For either setup path, check Settings > Product > Features and confirm Block unmanaged customizations is Off. Labs 06–08 customize Dataverse components or import unmanaged solutions. If policy prevents this, ask for a different dedicated lab environment rather than changing organization policy.

Leave Managed Environments disabled on a trial you create for the course. If your administrator provides a Managed Environment, it can be used only if it allows the lab customizations and your account has the required Managed Environments licensing{:target="_blank"}.

Turn on code apps

Labs 04 and 05 build Power Apps code apps. Enabling the feature doesn't grant runtime access. Check that the account you'll use to run the published apps has a qualifying license or billing entitlement{:target="_blank"}. For lab 08, confirm the account can run the flow with the connectors it uses. Creating a Trial environment doesn't assign these rights by itself.

  1. In the Power Platform admin center{:target="_blank"} at https://admin.powerplatform.microsoft.com, select Manage > Environments, and then select your lab environment.
  2. Select Settings.
  3. Expand Product, and then select Features.
  4. Find Power Apps code apps, and set the Enable code apps toggle to On.
  5. Select Save.

Return to Features and confirm Enable code apps still shows On.

Install the tools

Install the tools in the following table before you start the labs. Each lab's introduction names only the tools that specific lab uses, so you won't need all of these for any single lab.

Tool Labs that use it Get it
Visual Studio 2022 with the .NET desktop development workload (Windows only) Lab 01 Visual Studio downloads{:target="_blank"} at https://visualstudio.microsoft.com/downloads/
.NET SDK 8 Labs 02, 03, 07, and to install pac .NET 8 downloads{:target="_blank"} at https://dotnet.microsoft.com/download/dotnet/8.0
Plug-in Registration Tool Lab 01 Installed with the Power Platform CLI command pac tool prt (see the pac row below)
Node.js LTS (version 22 or later) Labs 04, 05, 07, 09 Node.js downloads{:target="_blank"} at https://nodejs.org/
Power Apps CLI (pa) Labs 04, 05 npm install --global @microsoft/power-apps-cli
Power Platform CLI (pac) Labs 01, 07 dotnet tool install --global Microsoft.PowerApps.CLI.Tool
Python 3.12 Labs 02, 10 Python downloads{:target="_blank"} at https://www.python.org/downloads/
Azure CLI Labs 01, 03, 10 Install the Azure CLI{:target="_blank"} at https://learn.microsoft.com/cli/azure/install-azure-cli
Azure Functions Core Tools v4 Lab 03 npm install -g azure-functions-core-tools@4 --unsafe-perm true
GitHub Copilot CLI Lab 09 npm install -g @github/copilot
Visual Studio Code with the GitHub Copilot extension Every lab Visual Studio Code downloads{:target="_blank"} at https://code.visualstudio.com/download
Git Every lab, to get the lab files Git downloads{:target="_blank"} at https://git-scm.com/downloads
A Chromium-based browser with developer tools (for example, Microsoft Edge) Several labs, to inspect network requests and debug code apps Likely already on your computer
  1. Install the tools from the table that you don't already have.

  2. Open a terminal and confirm the command-line tools respond:

    dotnet --version
    pac --version
    pa --version
    func --version
    az --version
    node --version
    git --version
    python --version
    copilot --version
    

Each command should print a version number rather than an error. If one doesn't, reopen your terminal first — some installers only update your terminal's path the next time you open it.

Set up GitHub Copilot access

Several exercises use GitHub Copilot in Visual Studio Code or GitHub Copilot CLI. Set up access once before starting those exercises. If you already have an individual Copilot plan or an organization-assigned seat, keep that access and follow your organization's policies; you don't need another account or subscription.

  1. Sign in to GitHub{:target="_blank"} at https://github.com using the account you intend to use for the exercises. If you don't have an account, create one at GitHub signup{:target="_blank"} (https://github.com/signup) and complete email verification.

  2. If you don't already have Copilot access, open GitHub Copilot plans{:target="_blank"} at https://github.com/features/copilot/plans. Under Free, select Get started and complete the activation using your personal, non-managed GitHub account.

    Choose Copilot Free, not a paid plan or a paid-plan trial. No purchase or payment details are required for this signup path. If only paid options appear, stop and check that you're using the intended account. An Enterprise Managed User account can't enroll in Copilot Free; use its organization-assigned Copilot access if available, or an eligible personal account if your policies allow it.

  3. Open your GitHub Copilot settings{:target="_blank"} at https://github.com/settings/copilot, and confirm that Copilot Free or your existing Copilot plan is active.

  4. In Visual Studio Code, open the installed GitHub Copilot Chat extension and sign in to GitHub using the same account. Review and complete any authorization prompts.

  5. Open Copilot Chat, enter Hello, and confirm you receive a response before continuing.

Copilot Free is available to eligible individual users; being a course attendee doesn't require GitHub Education verification. Copilot Student is a separate benefit for verified academic students. If you already qualify for that benefit, you can use it, but applying for it isn't a course prerequisite.

GitHub Copilot Free has usage limits. A learner's remaining allowance isn't guaranteed to cover every exercise. If Copilot reports that you've reached a limit, check the usage and reset information shown for your account. You can resume after the allowance resets or use an existing organization-assigned plan. Don't start a paid subscription just to proceed with setup.

For the MCP exercise, sign in to GitHub Copilot CLI using this same GitHub account when instructed. The later Dataverse authorization uses your Power Platform account, which may be different. A Microsoft 365 or Power Platform sign-in doesn't by itself provide GitHub Copilot access, and GitHub Copilot Free doesn't supply Dataverse MCP credits or billing coverage.

Important: After you finish the exercises on a shared computer, sign out of GitHub in Visual Studio Code, GitHub Copilot CLI, and the browser. Don't share your GitHub password, recovery codes, or access tokens.

Get the lab files

Every lab in this course starts from files in this repository. Get a local copy once, here, and reuse it for every lab.

  1. Open a terminal, and clone the AB-400 labs repository{:target="_blank"} at https://github.com/MicrosoftLearning/AB-400-microsoft-power-platform-developer.git:

    git clone https://github.com/MicrosoftLearning/AB-400-microsoft-power-platform-developer.git
    
  2. Each lab names the folder it uses inside the Allfiles folder of your cloned copy, for example Allfiles/01-equipment-validation-plugin.

  3. If you'd rather not clone the whole repository, each lab also links to its individual files by their raw download URL, so you can download only what that lab needs instead.

Confirm your cloned AB-400-microsoft-power-platform-developer folder contains both an Allfiles folder and an Instructions folder.

Import the base solution

Every Dataverse lab in this course reads and writes the same four tables: Employee, Device, Request, and Allowance. Import the solution that creates them once, here, so each lab can confirm it's there and start from the same sample data.

  1. Download EquipmentProvisioningBase_managed.zip{:target="_blank"} from https://raw.githubusercontent.com/MicrosoftLearning/AB-400-microsoft-power-platform-developer/main/Allfiles/shared/EquipmentProvisioningBase_managed.zip.
  2. Sign in to the Power Apps maker portal{:target="_blank"} at https://make.powerapps.com with the account you used for setup. If this is your first sign-in, follow the Get started prompts before continuing.
  3. Confirm the environment selector in the top right shows the lab environment you set up earlier in this guide. Solutions import into the selected environment, and importing into the wrong one is the easiest mistake to make at this step.
  4. Select Solutions, and then select Import solution.
  5. Select Browse, choose the file you downloaded, and select Next.
  6. Select Import, and wait about two minutes for the import to complete.
  7. When the import finishes, select Solutions > Managed and confirm Equipment Provisioning (base) appears in the list.

Note: You only need to do this once per environment. If a later version of the base solution is already installed, the import is refused — if that happens, you can skip this step and move on to loading the sample data.

Load the sample data

The base solution includes the Equipment Provisioning app and a repeatable way to load sample data into it.

  1. In the Power Apps maker portal{:target="_blank"} at https://make.powerapps.com, with your lab environment selected, select Apps. On the Equipment Provisioning row, select More commands (…) > Play.
  2. In the app's site map, select Requests.
  3. On the command bar, select Reset lab data.
  4. Wait for the Lab data reset dialog. Review what was created or restored, select OK, and then select Refresh to see the results.
  5. Confirm the Requests view lists six requests numbered REQ-SEED-001 through REQ-SEED-006.

Note: Every lab in this course runs Reset lab data again at its own start, so you always begin from the same known state, even if a previous lab left changes behind. It never deletes a row; it only restores seed rows that have drifted from their starting values.

Summary

You now have a Dataverse lab environment with code apps turned on, the developer tools this course uses, GitHub and GitHub Copilot signed in, a local copy of the lab files, and the base solution and sample data every lab depends on.

Keep this environment for the rest of the course — don't delete it between labs. You're ready to start with lab 01.

Troubleshooting

Issue Cause Solution
A pa command (pa app add data-source, pa app find-dataverse-api, pa app add dataverse-api, and similar) fails with a generic fetch failed or Network request failed … Connection timed out error A transient connection problem between your computer and the Power Platform service, unrelated to your environment or the exercise steps. The CLI makes a single attempt and doesn't retry on its own. Run the exact same command again. In testing, failures like this cleared within a few attempts; they don't indicate a misconfigured environment or a mistake in the exercise.