summary import { ManagedServiceIdentityClient } from "@msinternal/msi-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function identityListBySubscription ( ) { const subscriptionId = "subid" ; const credential = new DefaultAzureCredential ( ) ; const client = new ManagedServiceIdentityClient ( credential , subscriptionId ) ; const resArray = new Array ( ) ; for await ( let item of client . userAssignedIdentities . listBySubscription ( ) ) { resArray . push ( item ) ; } console . log ( resArray ) ; } identityListBySubscription ( ) . catch ( console . error ) ;