'Reference other deployment slot from app service in Bicep

I am trying to retrieve the principalId from the staging slot in Bicep. my code is the following.

resource App 'Microsoft.Web/sites@2016-08-01' existing = { 
    name: WebAppName
    scope: resourceGroup(ResourceGroupName)
}
...
...
id: App.identity.principalId
stagingId: ?????

How can I access the other slot? intellisense does not seem to help me.

Thx!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source