summary import { WebSiteManagementClient } from "@msinternal/web-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function listPublishingCredentialsPolicies ( ) { const subscriptionId = "3fb8d758-2e2c-42e9-a528-a8acdfe87237" ; const resourceGroupName = "testrg123" ; const name = "testsite" ; const slot = "staging" ; const credential = new DefaultAzureCredential ( ) ; const client = new WebSiteManagementClient ( credential , subscriptionId ) ; const resArray = new Array ( ) ; for await ( let item of client . webApps . listBasicPublishingCredentialsPoliciesSlot ( resourceGroupName , name , slot ) ) { resArray . push ( item ) ; } console . log ( resArray ) ; } listPublishingCredentialsPolicies ( ) . catch ( console . error ) ;