Azure / Azure/aksArc

[BUG] WAC uses old Subscription API and does not provide all Subscriptions available to user in dropdown

Open
#210 0 comments 0 reactions 0 assignees View on GitHub
Bug
Dominant language
PowerShell
Stars
118
Forks
63
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
When specifying the Subscription to use, WAC only provides the first page returned from the Azure Management API endpoint, despite the payload containing the `nextLink` URI for pagination. The first page only contains 50 results, which for some users and administrators is not enough to find the sub they need:

![image](https://user-images.githubusercontent.com/503974/188698363-29e3a16c-bf47-4dda-a7d0-bfa60cbaa7d2.png)

Additionally, the API endpoint being used is the 2016 version. The current version is from 2020:
https://docs.microsoft.com/en-us/rest/api/resources/subscriptions/list?tabs=HTTP

![image](https://user-images.githubusercontent.com/503974/188698466-730dabac-1ff2-464b-b1d4-fcde22813d82.png)

**To Reproduce**
1. Log into Azure with an account that has access to more than 50 subscriptions
2. Attempt to register an AKS-HCI cluster
3. Click the Subscription dropdown and see that you're missing stuff from the list

**Expected behavior**
A full list of all Subscriptions returned from the API endpoint by following the `nextLink` URI until all are enumerated.

**Environment (please complete the following information):**
- Browser: Chrome
- Version: 104.0.5112.102
- WAC Version: 2110.2 (build 1.3.2204.19002)
- AKS-HCI Extension Version: 2.79.0
- AKS-HCI Version: n/a
- Kubernetes Version: n/a

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.