summary import { StorageManagementClient } from "@msinternal/storage-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function storageAccountListByResourceGroup ( ) { const subscriptionId = "{subscription-id}" ; const resourceGroupName = "res6117" ; const credential = new DefaultAzureCredential ( ) ; const client = new StorageManagementClient ( credential , subscriptionId ) ; const resArray = new Array ( ) ; for await ( let item of client . storageAccounts . listByResourceGroup ( resourceGroupName ) ) { resArray . push ( item ) ; } console . log ( resArray ) ; } storageAccountListByResourceGroup ( ) . catch ( console . error ) ;