CmdID / az / az vm / az vm identity
az vm identity assign
Enable managed service identity on a VM. Azure CLI reference
5 options Its page in the Azure CLI reference
Options
--identitiesSpace-separated identities to assign.--name, -nScale set name.--roleRole name or id the system assigned identity will have.--scopeScope that the system assigned identity can access.--vm-nameThe name of the Virtual Machine.