Repository navigation
Admin API for PTE publishing/installing for BC30 and later - #2425
Draft
spetersenms wants to merge 3 commits into
Draft
spetersenms wants to merge 3 commits into
spetersenms wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The documentation omits that Scope Dev deployments installing or upgrading PTE dependencies on BC 30+ still require additional Admin Center API authorization and can fail without it.
1 open issue
What changed in this PR
This PR moves AL-Go’s PTE publishing and installation to the Admin Center API for Business Central 30 and later, while preserving legacy publishing for earlier versions.
Changes:
- Adds a shared, version-aware publisher with multipart uploads, operation polling, and bounded retries for transient status failures.
- Routes primary apps and PTE dependencies through the shared publisher and skips explicit old-version cleanup on BC 30+.
- Adds deployment tests and documents authorization requirements and service-managed cleanup.
| File | Description |
|---|---|
| Workshop/ContinuousDeployment.md | Documents authorization and cleanup behavior. |
| Tests/UnpublishOldAppVersions.Test.ps1 | Tests cleanup version boundaries and unknown versions. |
| Tests/PublishPTEApps.Test.ps1 | Tests routing, uploads, polling, and failure handling. |
| Tests/Deploy.Module.Test.ps1 | Tests shared publishing for PTE dependencies. |
| Tests/Deploy.Action.Test.ps1 | Tests action integration and cleanup sequencing. |
| Scenarios/settings.md | Updates deployment authorization and cleanup guidance. |
| Scenarios/RegisterSandboxEnvironment.md | Adds sandbox authorization instructions. |
| Scenarios/RegisterProductionEnvironment.md | Adds production authorization instructions. |
| RELEASENOTES.md | Announces authorization and cleanup changes. |
| Actions/Deploy/README.md | Describes publishing behavior and permissions. |
| Actions/Deploy/Deploy.psm1 | Implements shared publishing and version-aware cleanup. |
| Actions/Deploy/Deploy.ps1 | Uses the shared publisher for primary PTE apps. |
| Actions/.Modules/settings.schema.json | Aligns the cleanup setting description with version-specific behavior. |
Review effort: Balanced
|
|
||
| With delegated authentication (impersonation), **Scope PTE** deployment to **BC 30 or later** requires appropriate **Business Central administration center access** as well as the environment permissions. The existing **AUTHCONTEXT** credential structure and the commands above remain unchanged. See the official [Business Central administration center API documentation](https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/administration-center-api) for authentication and authorization details. | ||
|
|
||
| These additional permissions are not required for deployment to earlier BC versions or the sandbox development endpoint (**Scope Dev**). |
This branch has not been deployed
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.

❔What, Why & How
From BC30 and later we will use the new Admin API to handle PTE publishing and installing. This is due to the old API getting deprecated.
All new deployment logic is handled 100% by AL-Go and does not rely on BcContainerHelper. Cleanup of old versions are now automated by the environment with no options for a manual API call, which means the unpublishOldVersions setting is deprecated already and only relevant for BC29 and below.
Deployments using the new API require additional Admin Center permissions, which is documented.
Related to issue: #
✅ Checklist