It is obvious how to create a Service Principal (App Registration) via Azure CLI:
az ad sp create-for-rbac -n "My Service Principal" --scopes /subscriptions/the-subscription-guid
From the Azure Portal, you can add a Claims Group to the generated service principal, as such:
How can I add this via the Azure CLI at the time of creation of principal or after creating it? I did not find the documentation to do so.