summary import { WebSiteManagementClient } from "@msinternal/web-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function getAppDetector ( ) { const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345" ; const resourceGroupName = "Sample-WestUSResourceGroup" ; const siteName = "SampleApp" ; const diagnosticCategory = "availability" ; const detectorName = "sitecrashes" ; const slot = "Production" ; const credential = new DefaultAzureCredential ( ) ; const client = new WebSiteManagementClient ( credential , subscriptionId ) ; const result = await client . diagnostics . getSiteDetectorSlot ( resourceGroupName , siteName , diagnosticCategory , detectorName , slot ) ; console . log ( result ) ; } getAppDetector ( ) . catch ( console . error ) ;