r/AZURE • • 9h ago

Discussion Power Apps Code App deployment via Azure DevOps using PAC CLI fails with HTTP 403

Post image
1 Upvotes

1 comment sorted by

1

u/Likh-98 4h ago

The 403 on checkAccess and startSession tells me the service principal is authenticated but not allowed in that environment. Check that it is added as an application user in the target environment, with a security role that can create and edit apps, like Environment Maker, plus rights on the Code App itself. Being in Entra is not enough, it has to exist in Dataverse for that environment.

Also confirm the pipeline is pointed at the right environment URL, and that the app owner or a shared user is the same identity you deploy with. Since the task reports success on exit code 0 despite the errors, add a step that fails the pipeline when the CLI output contains Forbidden, and verify afterwards that the app version actually changed. Run the same command locally with the same service principal to reproduce it quickly.