script to retrieve information via O365 and AzureAD with a valid cred
Install these two modules
Install-Module MSOnline
Install-Module AzureAD
.\o365recon.ps1 -azure
There is only one flag (-azure) and it is optional. You will be prompted to auth. You may be prompted twice if MFA is enabled.