@microsoft/vscode-azext-azureauth 4.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 4.0.1 - 2024-12-17
|
|
4
|
+
|
|
5
|
+
* [#1856](https://github.com/microsoft/vscode-azuretools/pull/1856) Fix tenantId undefined error
|
|
6
|
+
|
|
3
7
|
## 4.0.0 - 2024-12-06
|
|
4
8
|
|
|
5
9
|
### What's new
|
|
@@ -14,8 +18,8 @@ Pass in a `vscode.LogOutputChannel` to the `VSCodeAzureSubscriptionProvider` con
|
|
|
14
18
|
|
|
15
19
|
## 3.1.0 - 2024-11-26
|
|
16
20
|
|
|
17
|
-
* [#1827](https://github.com/microsoft/vscode-azuretools/pull/1827) Add more comprehensive support for multi-account scenarios
|
|
18
|
-
* [#1815](https://github.com/microsoft/vscode-azuretools/issues/1815) Fix `VSCodeAzureSubscriptionProvider.getSubscriptions()` returning empty
|
|
21
|
+
* [#1827](https://github.com/microsoft/vscode-azuretools/pull/1827) Add more comprehensive support for multi-account scenarios
|
|
22
|
+
* [#1815](https://github.com/microsoft/vscode-azuretools/issues/1815) Fix `VSCodeAzureSubscriptionProvider.getSubscriptions()` returning empty
|
|
19
23
|
|
|
20
24
|
## 3.0.1 - 2024-11-19
|
|
21
25
|
* [#1819](https://github.com/microsoft/vscode-azuretools/pull/1819) Add account parameter to `AzureSubscriptionProvider.isSignedIn()` function to fix a multi-account issue [#1809](https://github.com/microsoft/vscode-azuretools/issues/1809)
|
|
@@ -32,7 +32,7 @@ exports.signInToTenant = signInToTenant;
|
|
|
32
32
|
function pickTenant(subscriptionProvider) {
|
|
33
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
34
34
|
const pick = yield vscode.window.showQuickPick(getPicks(subscriptionProvider), {
|
|
35
|
-
placeHolder: 'Select Directory to Sign In To',
|
|
35
|
+
placeHolder: 'Select a Tenant (Directory) to Sign In To',
|
|
36
36
|
matchOnDescription: true,
|
|
37
37
|
ignoreFocusOut: true,
|
|
38
38
|
});
|
|
@@ -42,7 +42,10 @@ function pickTenant(subscriptionProvider) {
|
|
|
42
42
|
function getPicks(subscriptionProvider) {
|
|
43
43
|
return __awaiter(this, void 0, void 0, function* () {
|
|
44
44
|
const unauthenticatedTenants = yield (0, getUnauthenticatedTenants_1.getUnauthenticatedTenants)(subscriptionProvider);
|
|
45
|
-
const picks = unauthenticatedTenants
|
|
45
|
+
const picks = unauthenticatedTenants
|
|
46
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
47
|
+
.sort((a, b) => (a.displayName).localeCompare(b.displayName))
|
|
48
|
+
.map(tenant => {
|
|
46
49
|
var _a, _b, _c;
|
|
47
50
|
return ({
|
|
48
51
|
label: (_a = tenant.displayName) !== null && _a !== void 0 ? _a : '',
|
|
@@ -35,8 +35,11 @@ function getUnauthenticatedTenants(subscriptionProvider) {
|
|
|
35
35
|
_d = false;
|
|
36
36
|
try {
|
|
37
37
|
const tenant = _c;
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
// Occasiounally users have run into one of their tenants being undefined https://github.com/microsoft/vscode-azureresourcegroups/issues/966
|
|
39
|
+
if (tenant) {
|
|
40
|
+
if (!(yield subscriptionProvider.isSignedIn(tenant.tenantId, tenant.account))) {
|
|
41
|
+
unauthenticatedTenants.push(tenant);
|
|
42
|
+
}
|
|
40
43
|
}
|
|
41
44
|
}
|
|
42
45
|
finally {
|