Support --allow-no-subscriptions equivalent for login without a subscription

Đang mở
#1,328 0 bình luận 2 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
32/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
azure, csharp
Lĩnh vực
authentication, cli

Hướng nghiên cứu

No files are named; start by locating how the az login command is registered and how it enumerates subscriptions after authentication, since the request is to let that step succeed with an empty list. Read the existing login option definitions and the code path that rejects a tenant with no subscriptions, then decide whether a new flag or a relaxed check fits. Done means az login --allow-no-subscriptions returns a token for a subscription-less tenant, with tests covering the empty-subscription case.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

act-identity-squad
Target surface

CLI (az)

What problem are you trying to solve?

In Azure CLI 2.x, there was an option called --allow-no-subscriptions. I used this option when I needed to log in to a tenant that has no subscriptions, just to get a token.

It seems that login now basically requires at least one subscription. I want to confirm whether this scenario (logging in to a subscription-less tenant to obtain a token) is no longer supported going forward.

Proposed solution

I would like azclips to support a way to log in and get a token even when the tenant has no subscriptions, similar to how az login --allow-no-subscriptions worked in Azure CLI 2.x.

az login --allow-no-subscriptions

If this is intentionally no longer supported, I would appreciate a note in the documentation explaining the reasoning and any recommended alternative.

Alternatives or workarounds

No response

Additional context

This came up because I rely on a subscription-less tenant login purely to obtain a token, not to manage Azure resources, so a subscription requirement at login time is a blocker for my use case.

Ngôn ngữ chính
C#
Star
18
Fork
10
Merge trung bình
1 ngày 20 giờ
Pull request đã merge (30 ngày)
157

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Azure/azclips

Tất cả issue của Azure/azclips

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.