Allow Scope to be PTE in continuousDeployment for PTE extensions in Sandbox (enhancement request)
Use Case
Developer asks new online environment on the customer tenant.
This should be a copy from the current UAT environment.
Since the current UAT is part of the CI/CD deployment, the latest version of our app has been published in sope Dev.
When creating a copy from the current UAT, all apps, published in scope Dev are removed in the new environment that is created.
If there are multiple PTE-apps installed in Dev scope, it is quit a hassle to reinstall all apps in the new environment.
Request
add a setting in the DeployTo<environmentname> that allows us to define the scope, e.g.: "scope": "PTE"
"DeployToUAT": {
"EnvironmentName": "UAT",
"continuousDeployment": true,
"scope": "PTE"
}
Good idea
Great idea @louagej
Currently there's a workaround. You need to authenticate using S2S token. See "client credential flow here: https://freddysblog.com/2021/01/25/bcauthcontext/
Downside, of using PTE scope, is that your extension list gets polluted with older extension versions.
@gntpet , I'm aware of the workaround, but not all customers are capable of creating an app registration in order to setup S2S authentication. In 50% of our deployments, we have to use the device authentication
New-BcAuthContext -includeDeviceLogin -tenantID $tenantID | New-ALGoAuthContext | set-Clipboard
@freddydk ,
maybe a good idea to prevent PTE-polution to unpublish previous version after publishing and installing the new version
on the unpublish - please see #409 and https://github.com/microsoft/navcontainerhelper/issues/2808
@freddydk , I did a small change and created a pull request for the publishing PTE apps only.