Description
AzureCliCredential can't get tokens if user auth azure cli by service principal with cert, which will throw Please provide either a non-null secret or a non-null certificate, is there any way or plan to fix this issue?
Reproduce
- Create Service Principal by az ad sp create-for-rbac
- Auth Azure ClI with sp created in last step
- Execute below codes
final Azure azure = Azure.configure().authenticate(AzureCliCredentials.create()).withDefaultSubscription();
azure.subscriptions().list().forEach(subs -> System.out.println(subs.subscriptionId()));