@microsoft/vscode-azext-azureauth 4.0.3 → 4.1.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.
@@ -1,174 +1,174 @@
1
- # Setting up workflow identity federation with Azure DevOps
2
-
3
- This guide describes how to set up your Azure DevOps (ADO) and Azure environment to leverage [workflow identity federation](https://learn.microsoft.com/entra/workload-id/workload-identity-federation), enabling you to use
4
- `AzureDevOpsSubscriptionProvider` provided in this section. See the [README](README.md#azure-devops-subscription-provider) for more details.
5
-
6
- ## 1. Create a new service principal
7
-
8
- Create a new service principal on which you will assign the necessary permissions. In this example, we use an app registration:
9
-
10
- 1. Navigate to the [App Registrations](https://ms.portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade) page on the Azure portal
11
- 2. Click on `New Registration`
12
-
13
- ![New Registration](guide-imgs/app_registration.jpg)
14
-
15
- 3. Assign any name
16
- 4. Make sure to select the first option for the account type (`Accounts in this organization directory only (Microsoft only - Single tenant)`)
17
- 5. Leave the Redirect URI and Service Tree ID fields empty
18
- 6. Click on `Register`
19
-
20
- ![Register an application](guide-imgs/app_registration_2.jpg)
21
-
22
- ## 2. Create a new Azure DevOps (ADO) Service Connection:
23
-
24
- Create a new ADO service connection under your organization's project. In this example, we create it under the DevDiv project:
25
-
26
- 1. Navigate to the [organization's (DevDiv) ADO page](https://devdiv.visualstudio.com/DevDiv)
27
- 2. Navigate to the settings page by clicking on the gear icon on the bottom left
28
- 3. Select the ["service connections"](https://devdiv.visualstudio.com/DevDiv/_settings/adminservices) blade from the panel on the left
29
-
30
- ![Select service connection](guide-imgs/service_connection_1.jpg)
31
-
32
- 4. Create a new service connection by clicking on the `New service connection` button
33
-
34
- ![Click on new service connection](guide-imgs/service_connection_2.jpg)
35
-
36
- 5. Select `Azure Resource Manager` as the type
37
- 6. Select `Workload Identity federation (manual)` for the authentication type
38
- 7. Provide a new name for your new service connection
39
- 8. Click on `Next`
40
- 9. This will create a new draft service connection, with the `issuer` and `subject identifier` fields already filled in.
41
- 10. Leave this window open while you finish the next step, which will require those `issuer` and `subject identifier` fields, then you will return to this window to finish creating the service principal
42
-
43
- ![Draft service connectoin screen](guide-imgs/service_connection_3.jpg)
44
-
45
- ## 3. Create a federated credential:
46
-
47
- Create a new "federated credential" on your service principal to connect it to your new service connection:
48
-
49
- 1. Navigate back to the Azure Portal page for your service connection (app registration) from step 1
50
- 2. Navigate to the `Certificates & secrets` blade
51
- 3. Navigate to the `Federated credentials` tab
52
- 4. Click on the `Add credential` button
53
-
54
- ![Add federated credential](guide-imgs/credential_1.jpg)
55
-
56
- 5. For the scenario, select `Other issuer`
57
- 6. For the `issuer` and `subject identifier` fields, fill in with the details of your draft service connection from the previous step
58
- 7. Select a new name for your new federated credential
59
-
60
- ![Fill in issuer, subject identifier, and name fields](guide-imgs/credential_2.jpg)
61
-
62
- 8. Click on `Add`
63
-
64
- ## 4. (Temporary but required) Grant your service principal reader role on the desired subscription:
65
-
66
- This step is not required for running your tests, but _is_ required to finish creating the service connection. This should be revoked after successful creation of the service connection and only necessary roles applied to the service principal.
67
-
68
- 1. On the Azure Portal, navigate to the page for the subscription you want the service principal to have access to.
69
- 2. Navigate to the `Access control (IAM)` blade
70
-
71
- ![access control tab](guide-imgs/subscription_1.jpg)
72
-
73
- 3. Navigate to the `Roles` tab
74
- 4. Click on the `+ Add` button, and choose `Add role assignment`
75
-
76
- ![add role](guide-imgs/subscription_2.jpg)
77
-
78
- 5. Choose `Reader` and click `Next`
79
- 6. Choose `User, group, or service principal`, then click on `+ Select members`
80
-
81
- ![select members](guide-imgs/subscription_3.jpg)
82
-
83
- 7. Select your service principal from step 1
84
- 8. Click on `Review and assign`
85
-
86
- ## 5. Finish creating your service connection:
87
-
88
- Finish creating the draft service connection you created in step 2.
89
-
90
- 1. Navigate back to your draft service connection from step 2
91
- 2. For Environment, select `Azure Cloud`
92
- 3. For Scope Level, choose `Subscription`
93
- 4. Under `Subscription Id`, and `Subscription Name`, write the subscription ID and name (must provide both) for the desired subscription
94
- 5. For `Service Principal Id`, provide the `Application (client) ID` of your app registration from step 1 (can be found in the `Overview` blade)
95
- 6. For the `Tenant ID`, provide the `Directory (tenant) ID` of your app registration from step 1 (can be found in `Overview` blade)
96
- 7. Click on `Verify and save`
97
-
98
- ## 6. Revoke unnecessary read access and assign only necessary roles
99
-
100
- Revoke the `Reader` role on the subscription for the service connection after it is created. This is no longer necessary.
101
-
102
- 1. Navigate to `Access control (IAM)` blade.
103
- 2. Under the `Role assignments` tab, find the role assignment corresponding to the App registered on step 1
104
- 3. Click on `Remove` then `Yes`
105
- 4. You can then assign the required roles to specific resources only if required, instead of assigning `Reader` role to the entire subscription.
106
-
107
- ## 7. Create a dummy Key Vault
108
-
109
- A dummy Key vault step is required to propagate the necessary environment variables in the context of the pipeline.
110
-
111
- 1. Create a new Key Vault resource in the subscription you want to test on
112
- 2. Give it a new name as appropriate. You can keep the default settings
113
-
114
- ![Create key vault](guide-imgs/dummy_kv.jpg)
115
-
116
- ## 8. Assign your service principal "key vault reader" role on the dummy Key Vault:
117
-
118
- 1. Navigate to `Access control (IAM)` blade on your newly created dummy key vault
119
-
120
- ![access control tab](guide-imgs/subscription_1.jpg)
121
-
122
- 2. Navigate to the `Roles` tab
123
- 3. Click on the `+ Add` button, and choose `Add role assignment`
124
-
125
- ![add role](guide-imgs/subscription_2.jpg)
126
-
127
- 4. Choose `Key Vault Reader` (**NOT** `Reader`) and click `Next`
128
- 5. Choose `User, group, or service principal`, then click on `+ Select members`
129
-
130
- ![select members](guide-imgs/subscription_3.jpg)
131
-
132
- 6. Select your app registration from step 1
133
- 7. Click on `Review and assign`
134
-
135
- ## 9. Add the dummy Key Vault step in the pipeline
136
-
137
- To ensure that the appropriate env variables are propagated in the context of running the pipeline, a dummy Key Vault step is required in that pipeline:
138
-
139
- 1. In the desired pipeline's `.yml` file, add a step as below. The `azureSubscription` field should correspond to the name of your service connection from step 2, while the `keyVaultName` field should correspond to the dummy key vault created in step 7:
140
-
141
- ```yml
142
- # This gives the TestServiceConnection service connection access to this pipeline.
143
- - task: AzureKeyVault@1
144
- displayName: 'Authorize TestServiceConnection service connection'
145
- inputs:
146
- azureSubscription: 'TestServiceConnection'
147
- KeyVaultName: 'TestDummyKeyVault'
148
- ```
149
-
150
- 2. In the step which runs your code (e.g., the npm test step), make sure that the `$(System.AccessToken)` variable is manually propagated as a `SYSTEM_ACCESSTOKEN` environment variable. All other required environment variables should be propagated automatically:
151
-
152
- ```yml
153
- - task: Npm@1
154
- displayName: "Test"
155
- inputs:
156
- command: custom
157
- customCommand: test
158
- env:
159
- SYSTEM_ACCESSTOKEN: $(System.AccessToken)
160
- ```
161
-
162
- ## 10. Pass the appropriate values to identify your service connection:
163
-
164
- The constructor for `AzureDevOpsSubscriptionProvider` expects three arguments in an initializer object in order to identify your service connection you setup in step 5.
165
-
166
- These are:
167
-
168
- - `serviceConnectionId`: The resource ID of the service connection created in step 2, which can be found on the `resourceId` field of the URL at the address bar, when viewing the service connection in the Azure DevOps portal
169
- - `domain`: The `Tenant ID` field of the service connection properties, which can be accessed by clicking "Edit" on the service connection page
170
- - `clientId`: The `Service Principal Id` field of the service connection properties, which can be accessed by clicking "Edit" on the service connection page
171
-
172
- ![identifier values for service connection](guide-imgs/identifier_values.jpg)
173
-
174
- Make sure you pass an object containing these variables for the `new AzureDevOpsServiceProvider()` constructor. These values are _not_ secrets, so they can be set as environment variables, assigned as pipeline variables in ADO, accessed and assigned using an Azure Key Vault step, or even manually hardcoded in code (not recommended).
1
+ # Setting up workflow identity federation with Azure DevOps
2
+
3
+ This guide describes how to set up your Azure DevOps (ADO) and Azure environment to leverage [workflow identity federation](https://learn.microsoft.com/entra/workload-id/workload-identity-federation), enabling you to use
4
+ `AzureDevOpsSubscriptionProvider` provided in this section. See the [README](README.md#azure-devops-subscription-provider) for more details.
5
+
6
+ ## 1. Create a new service principal
7
+
8
+ Create a new service principal on which you will assign the necessary permissions. In this example, we use an app registration:
9
+
10
+ 1. Navigate to the [App Registrations](https://ms.portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade) page on the Azure portal
11
+ 2. Click on `New Registration`
12
+
13
+ ![New Registration](guide-imgs/app_registration.jpg)
14
+
15
+ 3. Assign any name
16
+ 4. Make sure to select the first option for the account type (`Accounts in this organization directory only (Microsoft only - Single tenant)`)
17
+ 5. Leave the Redirect URI and Service Tree ID fields empty
18
+ 6. Click on `Register`
19
+
20
+ ![Register an application](guide-imgs/app_registration_2.jpg)
21
+
22
+ ## 2. Create a new Azure DevOps (ADO) Service Connection:
23
+
24
+ Create a new ADO service connection under your organization's project. In this example, we create it under the DevDiv project:
25
+
26
+ 1. Navigate to the [organization's (DevDiv) ADO page](https://devdiv.visualstudio.com/DevDiv)
27
+ 2. Navigate to the settings page by clicking on the gear icon on the bottom left
28
+ 3. Select the ["service connections"](https://devdiv.visualstudio.com/DevDiv/_settings/adminservices) blade from the panel on the left
29
+
30
+ ![Select service connection](guide-imgs/service_connection_1.jpg)
31
+
32
+ 4. Create a new service connection by clicking on the `New service connection` button
33
+
34
+ ![Click on new service connection](guide-imgs/service_connection_2.jpg)
35
+
36
+ 5. Select `Azure Resource Manager` as the type
37
+ 6. Select `Workload Identity federation (manual)` for the authentication type
38
+ 7. Provide a new name for your new service connection
39
+ 8. Click on `Next`
40
+ 9. This will create a new draft service connection, with the `issuer` and `subject identifier` fields already filled in.
41
+ 10. Leave this window open while you finish the next step, which will require those `issuer` and `subject identifier` fields, then you will return to this window to finish creating the service principal
42
+
43
+ ![Draft service connectoin screen](guide-imgs/service_connection_3.jpg)
44
+
45
+ ## 3. Create a federated credential:
46
+
47
+ Create a new "federated credential" on your service principal to connect it to your new service connection:
48
+
49
+ 1. Navigate back to the Azure Portal page for your service connection (app registration) from step 1
50
+ 2. Navigate to the `Certificates & secrets` blade
51
+ 3. Navigate to the `Federated credentials` tab
52
+ 4. Click on the `Add credential` button
53
+
54
+ ![Add federated credential](guide-imgs/credential_1.jpg)
55
+
56
+ 5. For the scenario, select `Other issuer`
57
+ 6. For the `issuer` and `subject identifier` fields, fill in with the details of your draft service connection from the previous step
58
+ 7. Select a new name for your new federated credential
59
+
60
+ ![Fill in issuer, subject identifier, and name fields](guide-imgs/credential_2.jpg)
61
+
62
+ 8. Click on `Add`
63
+
64
+ ## 4. (Temporary but required) Grant your service principal reader role on the desired subscription:
65
+
66
+ This step is not required for running your tests, but _is_ required to finish creating the service connection. This should be revoked after successful creation of the service connection and only necessary roles applied to the service principal.
67
+
68
+ 1. On the Azure Portal, navigate to the page for the subscription you want the service principal to have access to.
69
+ 2. Navigate to the `Access control (IAM)` blade
70
+
71
+ ![access control tab](guide-imgs/subscription_1.jpg)
72
+
73
+ 3. Navigate to the `Roles` tab
74
+ 4. Click on the `+ Add` button, and choose `Add role assignment`
75
+
76
+ ![add role](guide-imgs/subscription_2.jpg)
77
+
78
+ 5. Choose `Reader` and click `Next`
79
+ 6. Choose `User, group, or service principal`, then click on `+ Select members`
80
+
81
+ ![select members](guide-imgs/subscription_3.jpg)
82
+
83
+ 7. Select your service principal from step 1
84
+ 8. Click on `Review and assign`
85
+
86
+ ## 5. Finish creating your service connection:
87
+
88
+ Finish creating the draft service connection you created in step 2.
89
+
90
+ 1. Navigate back to your draft service connection from step 2
91
+ 2. For Environment, select `Azure Cloud`
92
+ 3. For Scope Level, choose `Subscription`
93
+ 4. Under `Subscription Id`, and `Subscription Name`, write the subscription ID and name (must provide both) for the desired subscription
94
+ 5. For `Service Principal Id`, provide the `Application (client) ID` of your app registration from step 1 (can be found in the `Overview` blade)
95
+ 6. For the `Tenant ID`, provide the `Directory (tenant) ID` of your app registration from step 1 (can be found in `Overview` blade)
96
+ 7. Click on `Verify and save`
97
+
98
+ ## 6. Revoke unnecessary read access and assign only necessary roles
99
+
100
+ Revoke the `Reader` role on the subscription for the service connection after it is created. This is no longer necessary.
101
+
102
+ 1. Navigate to `Access control (IAM)` blade.
103
+ 2. Under the `Role assignments` tab, find the role assignment corresponding to the App registered on step 1
104
+ 3. Click on `Remove` then `Yes`
105
+ 4. You can then assign the required roles to specific resources only if required, instead of assigning `Reader` role to the entire subscription.
106
+
107
+ ## 7. Create a dummy Key Vault
108
+
109
+ A dummy Key vault step is required to propagate the necessary environment variables in the context of the pipeline.
110
+
111
+ 1. Create a new Key Vault resource in the subscription you want to test on
112
+ 2. Give it a new name as appropriate. You can keep the default settings
113
+
114
+ ![Create key vault](guide-imgs/dummy_kv.jpg)
115
+
116
+ ## 8. Assign your service principal "key vault reader" role on the dummy Key Vault:
117
+
118
+ 1. Navigate to `Access control (IAM)` blade on your newly created dummy key vault
119
+
120
+ ![access control tab](guide-imgs/subscription_1.jpg)
121
+
122
+ 2. Navigate to the `Roles` tab
123
+ 3. Click on the `+ Add` button, and choose `Add role assignment`
124
+
125
+ ![add role](guide-imgs/subscription_2.jpg)
126
+
127
+ 4. Choose `Key Vault Reader` (**NOT** `Reader`) and click `Next`
128
+ 5. Choose `User, group, or service principal`, then click on `+ Select members`
129
+
130
+ ![select members](guide-imgs/subscription_3.jpg)
131
+
132
+ 6. Select your app registration from step 1
133
+ 7. Click on `Review and assign`
134
+
135
+ ## 9. Add the dummy Key Vault step in the pipeline
136
+
137
+ To ensure that the appropriate env variables are propagated in the context of running the pipeline, a dummy Key Vault step is required in that pipeline:
138
+
139
+ 1. In the desired pipeline's `.yml` file, add a step as below. The `azureSubscription` field should correspond to the name of your service connection from step 2, while the `keyVaultName` field should correspond to the dummy key vault created in step 7:
140
+
141
+ ```yml
142
+ # This gives the TestServiceConnection service connection access to this pipeline.
143
+ - task: AzureKeyVault@1
144
+ displayName: 'Authorize TestServiceConnection service connection'
145
+ inputs:
146
+ azureSubscription: 'TestServiceConnection'
147
+ KeyVaultName: 'TestDummyKeyVault'
148
+ ```
149
+
150
+ 2. In the step which runs your code (e.g., the npm test step), make sure that the `$(System.AccessToken)` variable is manually propagated as a `SYSTEM_ACCESSTOKEN` environment variable. All other required environment variables should be propagated automatically:
151
+
152
+ ```yml
153
+ - task: Npm@1
154
+ displayName: "Test"
155
+ inputs:
156
+ command: custom
157
+ customCommand: test
158
+ env:
159
+ SYSTEM_ACCESSTOKEN: $(System.AccessToken)
160
+ ```
161
+
162
+ ## 10. Pass the appropriate values to identify your service connection:
163
+
164
+ The constructor for `AzureDevOpsSubscriptionProvider` expects three arguments in an initializer object in order to identify your service connection you setup in step 5.
165
+
166
+ These are:
167
+
168
+ - `serviceConnectionId`: The resource ID of the service connection created in step 2, which can be found on the `resourceId` field of the URL at the address bar, when viewing the service connection in the Azure DevOps portal
169
+ - `domain`: The `Tenant ID` field of the service connection properties, which can be accessed by clicking "Edit" on the service connection page
170
+ - `clientId`: The `Service Principal Id` field of the service connection properties, which can be accessed by clicking "Edit" on the service connection page
171
+
172
+ ![identifier values for service connection](guide-imgs/identifier_values.jpg)
173
+
174
+ Make sure you pass an object containing these variables for the `new AzureDevOpsServiceProvider()` constructor. These values are _not_ secrets, so they can be set as environment variables, assigned as pipeline variables in ADO, accessed and assigned using an Azure Key Vault step, or even manually hardcoded in code (not recommended).
package/CHANGELOG.md CHANGED
@@ -1,90 +1,98 @@
1
- # Change Log
2
-
3
- ## 4.0.3 - 2024-12-20
4
- * [#1862](https://github.com/microsoft/vscode-azuretools/pull/1862) Display account name on duplicate tenant picks
5
-
6
- ## 4.0.2 - 2024-12-19
7
-
8
- * [#1861](https://github.com/microsoft/vscode-azuretools/pull/1861) Remove unecessary if statement
9
-
10
- ## 4.0.1 - 2024-12-17
11
-
12
- * [#1856](https://github.com/microsoft/vscode-azuretools/pull/1856) Fix tenantId undefined error
13
-
14
- ## 4.0.0 - 2024-12-06
15
-
16
- ### What's new
17
- Pass in a `vscode.LogOutputChannel` to the `VSCodeAzureSubscriptionProvider` constructor to enable logging. [#1851](https://github.com/microsoft/vscode-azuretools/pull/1851)
18
-
19
- `AzureSubscriptionProvider.getTenants()` now returns `AzureTenant[]` instead of `TenantIdDescription[]`. This is a breaking change for implementors of `AzureSubscriptionProvider`. [#1849](https://github.com/microsoft/vscode-azuretools/pull/1849)
20
-
21
- ### All Changes
22
- * [#1849](https://github.com/microsoft/vscode-azuretools/pull/1849) Create `AzureTenant` interface which includes account property
23
- * [#1850](https://github.com/microsoft/vscode-azuretools/pull/1850) Clean up `isSignedIn` implementation
24
- * [#1851](https://github.com/microsoft/vscode-azuretools/pull/1851) Add logging to `VSCodeAzureSubscriptionProvider`
25
-
26
- ## 3.1.0 - 2024-11-26
27
-
28
- * [#1827](https://github.com/microsoft/vscode-azuretools/pull/1827) Add more comprehensive support for multi-account scenarios
29
- * [#1815](https://github.com/microsoft/vscode-azuretools/issues/1815) Fix `VSCodeAzureSubscriptionProvider.getSubscriptions()` returning empty
30
-
31
- ## 3.0.1 - 2024-11-19
32
- * [#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)
33
- * [#1822](https://github.com/microsoft/vscode-azuretools/pull/1822) Add check in `VSCodeAzureSubscriptionProvider.getTenants()` to fix a multi-account issue [#1809](https://github.com/microsoft/vscode-azuretools/issues/1809)
34
-
35
- ## 3.0.0 - 2024-09-19
36
- * [#1789](https://github.com/microsoft/vscode-azuretools/pull/1789) Change `getTenants` to be compatible with the new Azure Resources tenants view. This also includes a possible breaking change where an optional parameter `account` which when passed in `getTenants` will return the tenants associated with that single account. Otherwise `getTenants` will return the tenants for all authenticated accounts.
37
-
38
- ## 2.5.0 - 2024-08-06
39
-
40
- * Add `getSessionWithScopes` to get a session that has the proper scoping instead of always the default management plane
41
-
42
- ## 2.4.1 - 2024-05-15
43
-
44
- * [#1729](https://github.com/microsoft/vscode-azuretools/pull/1729) Change AzureDevOpsSubscriptionProvider so that it accepts values as arguments
45
-
46
- ## 2.4.0 - 2024-05-07
47
-
48
- * [#1723](https://github.com/microsoft/vscode-azuretools/pull/1723) Implementation fo AzureSub provider that leverages federated credentials
49
-
50
- ## 2.1.0 - 2023-12-13
51
-
52
- * Use management endpoint for scope by default to fix deploying app service projects with sovereign clouds
53
-
54
- ## 2.0.0 - 2023-11-20
55
-
56
- * Switches to use `@azure/arm-resources-subscriptions` instead of `@azure/arm-subscriptions`. Potentially a breaking change so I revved the major version.
57
- * Fixes an issue where the `endpoint` wasn't set for the subscription client, breaking sovereign clouds
58
-
59
- ## 1.4.0 - 2023-11-03
60
- * [#1619](https://github.com/microsoft/vscode-azuretools/pull/1619) Make `getSession` synchronous to fix an issue that broke app service deployments
61
-
62
- ## 1.3.0 - 2023-10-23
63
-
64
- * [#1610](https://github.com/microsoft/vscode-azuretools/pull/1610) Add `signInToTenant` command which facilitates signing in to a specific tenant.
65
- * [#1610](https://github.com/microsoft/vscode-azuretools/pull/1610) Add `getUnauthenticatedTenants` utility.
66
-
67
- ## 1.2.2 - 2023-10-19
68
-
69
- * [#1608](https://github.com/microsoft/vscode-azuretools/pull/1608) Fix appending `.default` to tenant id scope which caused sign in to fail
70
-
71
- ## 1.2.1 - 2023-09-26
72
-
73
- * [#1594](https://github.com/microsoft/vscode-azuretools/pull/1594) Fix getScopes always injecting the management scope, even if a scope for a different resource is specified
74
- * [#1597](https://github.com/microsoft/vscode-azuretools/pull/1597) Make `authentication.getSession` use scopes argument
75
-
76
- ## 1.1.3 - 2023-09-14
77
-
78
- * [#1585](https://github.com/microsoft/vscode-azuretools/pull/1585) Check if tenant is signed in before listing subscriptions
79
-
80
- ## 1.1.2 - 2023-07-26
81
-
82
- * [#1542](https://github.com/microsoft/vscode-azuretools/pull/1542) Fix Azure subscriptions are not returned in alphabetical order
83
-
84
- ## 1.1.1 - 2023-07-26
85
-
86
- * [#1540](https://github.com/microsoft/vscode-azuretools/pull/1540) Ignore .default if it is passed as a scope
87
-
88
- ## 1.0.0 - 2023-06-05
89
-
90
- Initial release
1
+ # Change Log
2
+
3
+ ## 4.1.1 - 2025-02-03
4
+
5
+ * Fix `VSCodeAzureSubscriptionProvider` implementation of `getSubscriptions` filtering returned subscriptions by `getSubscriptionFilters()` when the `filter` parameter is a `GetSubscriptionsFilter` object.
6
+
7
+ ## 4.1.0 - 2025-01-31
8
+
9
+ * Add filtering `getSubscriptions` by a specific account and/or tenant.
10
+
11
+ ## 4.0.3 - 2024-12-20
12
+ * [#1862](https://github.com/microsoft/vscode-azuretools/pull/1862) Display account name on duplicate tenant picks
13
+
14
+ ## 4.0.2 - 2024-12-19
15
+
16
+ * [#1861](https://github.com/microsoft/vscode-azuretools/pull/1861) Remove unecessary if statement
17
+
18
+ ## 4.0.1 - 2024-12-17
19
+
20
+ * [#1856](https://github.com/microsoft/vscode-azuretools/pull/1856) Fix tenantId undefined error
21
+
22
+ ## 4.0.0 - 2024-12-06
23
+
24
+ ### What's new
25
+ Pass in a `vscode.LogOutputChannel` to the `VSCodeAzureSubscriptionProvider` constructor to enable logging. [#1851](https://github.com/microsoft/vscode-azuretools/pull/1851)
26
+
27
+ `AzureSubscriptionProvider.getTenants()` now returns `AzureTenant[]` instead of `TenantIdDescription[]`. This is a breaking change for implementors of `AzureSubscriptionProvider`. [#1849](https://github.com/microsoft/vscode-azuretools/pull/1849)
28
+
29
+ ### All Changes
30
+ * [#1849](https://github.com/microsoft/vscode-azuretools/pull/1849) Create `AzureTenant` interface which includes account property
31
+ * [#1850](https://github.com/microsoft/vscode-azuretools/pull/1850) Clean up `isSignedIn` implementation
32
+ * [#1851](https://github.com/microsoft/vscode-azuretools/pull/1851) Add logging to `VSCodeAzureSubscriptionProvider`
33
+
34
+ ## 3.1.0 - 2024-11-26
35
+
36
+ * [#1827](https://github.com/microsoft/vscode-azuretools/pull/1827) Add more comprehensive support for multi-account scenarios
37
+ * [#1815](https://github.com/microsoft/vscode-azuretools/issues/1815) Fix `VSCodeAzureSubscriptionProvider.getSubscriptions()` returning empty
38
+
39
+ ## 3.0.1 - 2024-11-19
40
+ * [#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)
41
+ * [#1822](https://github.com/microsoft/vscode-azuretools/pull/1822) Add check in `VSCodeAzureSubscriptionProvider.getTenants()` to fix a multi-account issue [#1809](https://github.com/microsoft/vscode-azuretools/issues/1809)
42
+
43
+ ## 3.0.0 - 2024-09-19
44
+ * [#1789](https://github.com/microsoft/vscode-azuretools/pull/1789) Change `getTenants` to be compatible with the new Azure Resources tenants view. This also includes a possible breaking change where an optional parameter `account` which when passed in `getTenants` will return the tenants associated with that single account. Otherwise `getTenants` will return the tenants for all authenticated accounts.
45
+
46
+ ## 2.5.0 - 2024-08-06
47
+
48
+ * Add `getSessionWithScopes` to get a session that has the proper scoping instead of always the default management plane
49
+
50
+ ## 2.4.1 - 2024-05-15
51
+
52
+ * [#1729](https://github.com/microsoft/vscode-azuretools/pull/1729) Change AzureDevOpsSubscriptionProvider so that it accepts values as arguments
53
+
54
+ ## 2.4.0 - 2024-05-07
55
+
56
+ * [#1723](https://github.com/microsoft/vscode-azuretools/pull/1723) Implementation fo AzureSub provider that leverages federated credentials
57
+
58
+ ## 2.1.0 - 2023-12-13
59
+
60
+ * Use management endpoint for scope by default to fix deploying app service projects with sovereign clouds
61
+
62
+ ## 2.0.0 - 2023-11-20
63
+
64
+ * Switches to use `@azure/arm-resources-subscriptions` instead of `@azure/arm-subscriptions`. Potentially a breaking change so I revved the major version.
65
+ * Fixes an issue where the `endpoint` wasn't set for the subscription client, breaking sovereign clouds
66
+
67
+ ## 1.4.0 - 2023-11-03
68
+ * [#1619](https://github.com/microsoft/vscode-azuretools/pull/1619) Make `getSession` synchronous to fix an issue that broke app service deployments
69
+
70
+ ## 1.3.0 - 2023-10-23
71
+
72
+ * [#1610](https://github.com/microsoft/vscode-azuretools/pull/1610) Add `signInToTenant` command which facilitates signing in to a specific tenant.
73
+ * [#1610](https://github.com/microsoft/vscode-azuretools/pull/1610) Add `getUnauthenticatedTenants` utility.
74
+
75
+ ## 1.2.2 - 2023-10-19
76
+
77
+ * [#1608](https://github.com/microsoft/vscode-azuretools/pull/1608) Fix appending `.default` to tenant id scope which caused sign in to fail
78
+
79
+ ## 1.2.1 - 2023-09-26
80
+
81
+ * [#1594](https://github.com/microsoft/vscode-azuretools/pull/1594) Fix getScopes always injecting the management scope, even if a scope for a different resource is specified
82
+ * [#1597](https://github.com/microsoft/vscode-azuretools/pull/1597) Make `authentication.getSession` use scopes argument
83
+
84
+ ## 1.1.3 - 2023-09-14
85
+
86
+ * [#1585](https://github.com/microsoft/vscode-azuretools/pull/1585) Check if tenant is signed in before listing subscriptions
87
+
88
+ ## 1.1.2 - 2023-07-26
89
+
90
+ * [#1542](https://github.com/microsoft/vscode-azuretools/pull/1542) Fix Azure subscriptions are not returned in alphabetical order
91
+
92
+ ## 1.1.1 - 2023-07-26
93
+
94
+ * [#1540](https://github.com/microsoft/vscode-azuretools/pull/1540) Ignore .default if it is passed as a scope
95
+
96
+ ## 1.0.0 - 2023-06-05
97
+
98
+ Initial release
package/LICENSE.md CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) Microsoft Corporation. All rights reserved.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation. All rights reserved.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE