-
Notifications
You must be signed in to change notification settings - Fork 259
Description
Hi,
I tried to import test toolkit to customer sandbox (BC 26.5, region LT, based on W1) and it failed to import System Application Test Library app.
Then I tried to do the same on BC 27 sandbox environment and I get the same error. See scripts and logs below.
I'm using BcContainerHelper version 6.1.7 but can also reproduce the problem on 6.1.9.
The import fails on Microsoft_System Application Test Library. That app has OnPrem scope, however, Permissions Mock app is imported without error despite also having OnPrem scope.
Set-PSDebug -Trace 1 shows that the initial error happens here
https://github.com/microsoft/navcontainerhelper/blob/644cb23965063dd462dde8691a0f40f76556abc6/Saas/Install-BcAppFromAppSource.ps1#L83C17-L83C175
And that is BC platform API territory.
Thanks.
Script for creating the container
$ContainerName = 'bc27'
$BcArtifactUrl = Get-BCArtifactUrl -type Sandbox -version 27 -country base -accept_insiderEula; $BcArtifactUrl
# https://bcartifacts-exdbf9fwegejdqak.b02.azurefd.net/sandbox/27.0.38460.41893/base
$ContainerCredential = New-Object -TypeName pscredential -ArgumentList 'user', ('Password1.' | ConvertTo-SecureString -AsPlainText -Force)
$Container = @{
accept_eula = $true
accept_insiderEula = $true
containerName = $ContainerName
isolation = 'hyperv'
updateHosts = $true
artifactUrl = $BcArtifactUrl
useSSL = $false
installCertificateOnHost = $true
assignPremiumPlan = $true
enableTaskScheduler = $true
multitenant = $true
includeTestToolkit = $true
includeTestLibrariesOnly = $true
}
New-BcContainer @Container -Credential $ContainerCredential -auth NavUserPasswordScript for creating the BC auth context
$BcAuthContext = New-BcAuthContext -tenantID 49043c13-068b-4e74-bf34-2a85803b73fe -includeDeviceLoginError:
PS C:\Users\ernjus> Import-TestToolkitToBcContainer -bcAuthContext $BcAuthContext -environment 'Contoso27_DEV' -containerName bc27 -useDevEndpoint -includeTestLibrariesOnly
Installing 40860557-a18d-42ad-aecb-22b7dd80dc80 on Contoso27_DEV
Operation ID 888b1644-5c44-498c-9c6f-48752de43156
scheduled........
running........................................
succeeded
Installing 23de40a6-dfe8-4f80-80db-d70f83ce8caf on Contoso27_DEV
Operation ID 8e1167a4-5839-4929-aad5-006e75e3111b
scheduled....
running.......................................
succeeded
Installing e7320ebb-08b3-4406-b1ec-b4927d3e280b on Contoso27_DEV
Operation ID a6ac834c-ecf3-4467-85ef-71af299e7331
scheduled.....
running.....................................
succeeded
Installing dd0be2ea-f733-4d65-bb34-a28f4624fb14 on Contoso27_DEV
Operation ID 728d92db-be24-49f6-b30b-a5d1f62dd541
scheduled......
running......................................
succeeded
App Permissions Mock from Microsoft version 27.1.41698.41831 is already installed
Installing 5095f467-0a01-4b99-99d1-9ff1237d286f on Contoso27_DEV
Operation ID 3a69c3f0-4fcf-4e22-bf67-13a00a8983d6
scheduled.....
running.......................................
succeeded
Installing 9856ae4f-d1a7-46ef-89bb-6ef056398228 on Contoso27_DEV
Install-BcAppFromAppSource Telemetry Correlation Id: 49d6421c-9d05-4eef-8969-a3e45d7c05e1
Import-TestToolkitToBcContainer Telemetry Correlation Id: 0aba34d2-0e75-4e84-8e68-22d1c10ac24a
Exception: C:\Users\ernjus\OneDrive - Softera Baltic UAB\Documents\PowerShell\Modules\BcContainerHelper\6.1.7\Saas\Install-BcAppFromAppSource.ps1:86
Line |
86 | throw (GetExtendedErrorMessage $_)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Response status code does not indicate success: 400 (Bad Request). Response status code does not indicate success: 400 (Bad Request).