My app service is
- running on Azure
- has authentication enabled (API Management - ClientId and Secret)
- has a deployment slot called staging
Before we enabled the authentication we could run the following powershell command to swap staging and production slots:
Switch-AzureRmWebAppSlot -SourceSlotName "staging" -DestinationSlotName "production" -Name "app1" -ResourceGroupName "group1" -verbose -SwapWithPreviewAction ApplySlotConfig
Swap with preview allows us to verify the deployed code works with the production configuration settings before switching users over to the newly deployed version.
However, after we enabled authentication to protect our app, we now receive the following error using the SwapWithPreviewAction
Switch-AzureRmWebAppSlot : Swap with Preview cannot be used when one of the slots has site authentication enabled.
At line:3 char:19
+ ... e-Command { Switch-AzureRmWebAppSlot -SourceSlotName "staging" -Desti ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Switch-AzureRmWebAppSlot], CloudException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.WebApps.Cmdlets.DeploymentSlots.SwitchAzureWebAppSlot
Does anyone know if it is possible to run swaps with authentication enabled? If so, how?