Fix Power Apps package exports in sovereign clouds#5408
Merged
Conversation
Use the cloud-specific Power Apps service audience for Power Apps and Business Applications package endpoints that were still using the ARM token. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates Power Apps and BAP requests to use cloud-specific Power Apps authentication in sovereign clouds.
Changes:
- Uses Power Apps tokens for package export/import operations.
- Updates custom connector requests and admin endpoints.
- Documents the additional audience requirement.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
ImportFlow.cs |
Uses Power Apps authentication for imports. |
ExportFlow.cs |
Uses Power Apps authentication for ZIP exports. |
ExportPowerApp.cs |
Corrects package export authentication and environment routing. |
GetPowerPlatformCustomConnector.cs |
Corrects authentication and admin listing. |
Import-PnPFlow.md |
Documents Power Apps permission. |
Export-PnPFlow.md |
Documents ZIP export permission. |
Export-PnPPowerApp.md |
Documents Power Apps permission. |
Get-PnPPowerPlatformCustomConnector.md |
Documents Power Apps permission. |
CHANGELOG.md |
Records the sovereign-cloud fixes. |
| - Fixed issue with Azure functions not working properly when we also have other modules like Az which rely on .NET 10. [#5393](https://github.com/pnp/powershell/pull/5393) | ||
| - Fixed multi-geo compatibility issues with `Get-PnPGeoAdministrator` response handling, `Set-PnPMultiGeoExperience` confirmation prompts, and unsupported-version errors for `Set-PnPMultiGeoCompanyAllowedDataLocation`. [#5401](https://github.com/pnp/powershell/pull/5401) | ||
| - Fixed Power Apps cmdlets to use cloud-specific Power Apps service audiences and endpoints for government clouds. [#5404](https://github.com/pnp/powershell/pull/5404) | ||
| - Fixed `Export-PnPPowerApp`, `Get-PnPPowerPlatformCustomConnector`, `Export-PnPFlow -AsZipPackage`, and `Import-PnPFlow` to use the Power Apps service audience when calling Power Apps and Business Applications endpoints in sovereign clouds. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before creating a pull request, make sure that you have read the contribution file located at
https://github.com/pnp/powerShell/blob/dev/CONTRIBUTING.md
Type
Related Issues?
Follow-up to #5404.
What is in this Pull Request ?
Power Apps and Business Applications package endpoints in sovereign clouds require the cloud-specific Power Apps service audience. Some Power Apps and BAP callers still used the ARM token, causing government cloud calls such as
Export-PnPPowerAppto fail even after the endpoint mapping fix in #5404.This PR updates
Export-PnPPowerAppto use the Power Apps service token for all BAP package calls and to pass the current Azure environment into each BAP helper call. It also switchesGet-PnPPowerPlatformCustomConnectorto the Power Apps request helper, aligns its admin list endpoint, and applies the same BAP token fix to ZIP package flow export/import paths while leaving ProcessSimple flow APIs on ARM.Documentation and the current nightly changelog now list the additional Power Apps audience requirement for the affected cmdlets.
Guidance
N/A