Skip to content

[Feature-Request] Support Service Principal with Cert in AzureCliCredential #672

@Flanker32

Description

@Flanker32

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()));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions