Study FAQ
How do I initialize and run a Power Apps code app locally?
Also asked as 2
- Which CLI do I use to create a code app and open Local Play?
- How can I verify my code app is initialized in the intended Power Platform environment?
Answer
Use the Power Apps CLI pa from the approved starter's project root. Initialize the app in an environment where code apps are enabled, then open its Local Play address from a browser profile signed into the intended Power Platform tenant.
With Node.js LTS, npm, Git and Microsoft's Vite starter, the documented setup is:
npm install --global @microsoft/power-apps-cli
npm install --global @microsoft/power-apps
npm install
pa app init
pa app run
Review the starter's dependency versions as well as the globally installed tooling. Sign in when prompted, select the intended development environment and inspect the resulting project configuration. Allow browser local network access if the Local Play workflow requires it. Verify that the blank app loads in the correct tenant before adding live data connections. Microsoft Power Platform CLI pac remains a separate tool used for tasks such as PCF development.
Full explanation
AB-400: Building Code Apps with Dataverse and Automation
Study guide · AB-400
Read the full explanation