Feature Request: Device Code authentication flow for Power Apps CLI #315
Replies: 2 comments
|
Thanks for the detailed request, Tuong Doan (@TuongDoan). Device code authentication is a valid gap — the old pac auth create --deviceCode flow supported headless and remote environments, and the new @microsoft/power-apps npm CLI currently requires a browser on the same machine. This has been added to our backlog. The scenarios you described (SSH sessions, GitHub Codespaces, CI/CD pipelines, restricted desktops) are all use cases we want to support. We can't commit to a timeline yet, but your write-up of the proposed UX (--device-code flag or a standalone |
|
This is already available in the latest version of the CLI v1.0.0. You can call pa auth login --device-code to use this flow. |
Uh oh!
There was an error while loading. Please reload this page.
Summary
The new
@microsoft/power-appsnpm CLI (npx power-apps init,npx power-apps push, etc.) currently onlysupports interactive browser-based authentication. Please add support for Device Code authentication flow,
similar to
pac auth create --deviceCodein the PAC CLI.Motivation
Device Code flow is essential for scenarios where a browser cannot be opened on the same machine:
The old PAC CLI workflow supported this via
pac auth create --deviceCode, which displayed a URL and code the usercould enter on any device with a browser. With the new npm-based CLI replacing
pac codecommands, thiscapability is no longer available.
Proposed Solution
Add a
--device-codeflag tonpx power-apps initand any other commands that require authentication:This would:
Alternatively, a standalone auth command like npx power-apps auth --device-code that persists credentials for
subsequent commands would also work.
All reactions