Description
AzureCliCredential only support regions defined in AzureEnvironment, for user defined environment, environment() will return null and cause NullPointException, refers here
Reproduce
- Register Azure Environment with
az cloud register
- Switch Azure Environment with
az cloud set -n
- Execute below codes
final Azure azure = Azure.configure().authenticate(AzureCliCredentials.create()).withDefaultSubscription();
azure.subscriptions().list().forEach(subs -> System.out.println(subs.subscriptionId()));