summary import { Identity , ManagedServiceIdentityClient } from "@msinternal/msi-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function identityCreate ( ) { const subscriptionId = "subid" ; const resourceGroupName = "rgName" ; const resourceName = "resourceName" ; const parameters = { location : "eastus" , tags : { key1 : "value1" , key2 : "value2" } } ; const credential = new DefaultAzureCredential ( ) ; const client = new ManagedServiceIdentityClient ( credential , subscriptionId ) ; const result = await client . userAssignedIdentities . createOrUpdate ( resourceGroupName , resourceName , parameters ) ; console . log ( result ) ; } identityCreate ( ) . catch ( console . error ) ;