I'm new to Azure, so it might be a stupid question, but here goes.
My company uses Lighthouse to manage multiple customers. I'm trying to get information from Azure via the CLI az. In my web GUI I can 'Switch Directory' and get 2 directories. I also get a dropdown box with managed customers (with IDs) for the chosen directory and under that a dropdown with their subscriptions.
I can use
az rest --method GET --uri https://management.azure.com/tenants?api-version=2020-01-01
to get a list of the two directories
I can use
az account list
to get a list of all the subscriptions of both directories.
In that last data is a field called 'homeTenantId' that has the ID of the customer.
How do I get a list of all customers display names and their ID? (which I can see on the web GUI)