summary import { TopLevelDomainAgreementOption , WebSiteManagementClient } from "@msinternal/web-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function listTopLevelDomainAgreements ( ) { const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345" ; const name = "in" ; const agreementOption = { forTransfer : false , includePrivacy : true } ; const credential = new DefaultAzureCredential ( ) ; const client = new WebSiteManagementClient ( credential , subscriptionId ) ; const resArray = new Array ( ) ; for await ( let item of client . topLevelDomains . listAgreements ( name , agreementOption ) ) { resArray . push ( item ) ; } console . log ( resArray ) ; } listTopLevelDomainAgreements ( ) . catch ( console . error ) ;