Skip to content
This repository was archived by the owner on Jun 15, 2026. It is now read-only.
This repository was archived by the owner on Jun 15, 2026. It is now read-only.

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

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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