How to configure system and user assigned identities on an Azure VM using Azure CLI

Step by step instructions for configuring a system and user assigned identities on an Azure VM, using Azure CLI.