diff --git a/AzurePowershell.Test.targets b/AzurePowershell.Test.targets
index 93506ce9c63c..aaff65dc4fb9 100644
--- a/AzurePowershell.Test.targets
+++ b/AzurePowershell.Test.targets
@@ -67,6 +67,7 @@
+
diff --git a/src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj b/src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj
index d7c1e7e01791..588c8a15e5fc 100644
--- a/src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj
+++ b/src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj
@@ -57,13 +57,17 @@
..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
- False
..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
False
..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
+ ..\..\packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll
+ True
+
False
..\..\packages\Microsoft.Azure.Management.Resources.2.18.7-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
diff --git a/src/Common/Commands.Common.Storage/packages.config b/src/Common/Commands.Common.Storage/packages.config
index 5cc9c60e8074..dad781bcb501 100644
--- a/src/Common/Commands.Common.Storage/packages.config
+++ b/src/Common/Commands.Common.Storage/packages.config
@@ -4,6 +4,7 @@
+
@@ -21,4 +22,4 @@
-
+
\ No newline at end of file
diff --git a/src/Common/Commands.Common/Commands.Common.csproj b/src/Common/Commands.Common/Commands.Common.csproj
index 63319dde1231..d78e6a93ba52 100644
--- a/src/Common/Commands.Common/Commands.Common.csproj
+++ b/src/Common/Commands.Common/Commands.Common.csproj
@@ -64,8 +64,8 @@
..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
- False
..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
False
diff --git a/src/Common/Commands.Common/packages.config b/src/Common/Commands.Common/packages.config
index dd635905d17b..8b3394fd6012 100644
--- a/src/Common/Commands.Common/packages.config
+++ b/src/Common/Commands.Common/packages.config
@@ -16,4 +16,4 @@
-
+
\ No newline at end of file
diff --git a/src/Common/Commands.ResourceManager.Common/Commands.ResourceManager.Common.csproj b/src/Common/Commands.ResourceManager.Common/Commands.ResourceManager.Common.csproj
index 3a2dd29bbad5..e25272568f43 100644
--- a/src/Common/Commands.ResourceManager.Common/Commands.ResourceManager.Common.csproj
+++ b/src/Common/Commands.ResourceManager.Common/Commands.ResourceManager.Common.csproj
@@ -61,8 +61,8 @@
..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
- False
..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
False
@@ -184,6 +184,7 @@
+
True
diff --git a/src/Common/Commands.ResourceManager.Common/ModelExtensions.cs b/src/Common/Commands.ResourceManager.Common/ModelExtensions.cs
new file mode 100644
index 000000000000..e5731fc7120e
--- /dev/null
+++ b/src/Common/Commands.ResourceManager.Common/ModelExtensions.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Microsoft.Azure.Common.Authentication.Models;
+using Microsoft.Azure.Subscriptions.Models;
+
+namespace Microsoft.Azure.Commands.ResourceManager.Common
+{
+ public static class ModelExtensions
+ {
+
+ public static AzureSubscription ToAzureSubscription(this Subscription other, AzureContext context)
+ {
+ var subscription = new AzureSubscription();
+ subscription.Account = context.Account != null ? context.Account.Id : null;
+ subscription.Environment = context.Environment != null ? context.Environment.Name : EnvironmentName.AzureCloud;
+ subscription.Id = new Guid(other.SubscriptionId);
+ subscription.Name = other.DisplayName;
+ subscription.SetProperty(AzureSubscription.Property.Tenants,
+ context.Tenant.Id.ToString());
+ return subscription;
+ }
+ }
+}
diff --git a/src/Common/Commands.ResourceManager.Common/RMProfileClient.cs b/src/Common/Commands.ResourceManager.Common/RMProfileClient.cs
index c4f81eb7a4b4..117941b8c88b 100644
--- a/src/Common/Commands.ResourceManager.Common/RMProfileClient.cs
+++ b/src/Common/Commands.ResourceManager.Common/RMProfileClient.cs
@@ -140,6 +140,18 @@ public List ListTenants(string tenant)
.ToList();
}
+ public bool TryGetSubscription(string tenantId, string subscriptionId, out AzureSubscription subscription)
+ {
+ if (string.IsNullOrWhiteSpace(tenantId))
+ {
+ throw new ArgumentNullException("Please provide a valid tenant Id");
+ }
+
+ AzureTenant tenant;
+ return TryGetTenantSubscription(_profile.Context.Account, _profile.Context.Environment,
+ tenantId, subscriptionId, null, ShowDialog.Never, out subscription, out tenant);
+ }
+
private bool TryGetTenantSubscription(
AzureAccount account,
AzureEnvironment environment,
@@ -177,7 +189,8 @@ private bool TryGetTenantSubscription(
if (subscriptions.Count > 1)
{
WriteWarningMessage(string.Format(
- "Tenant '{0}' contains more than one subscription. First one will be selected for further use.",
+ "Tenant '{0}' contains more than one subscription. First one will be selected for further use. " +
+ "To select another subscription, use Set-AzureRMContext.",
tenantId));
}
subscriptionFromServer = subscriptions.First();
@@ -233,6 +246,69 @@ private List ListAccountTenants(AzureAccount account, AzureEnvironm
}
}
+ ///
+ /// List all tenants for the account in the profile context
+ ///
+ /// The list of tenants for the default account.
+ public IEnumerable ListTenants()
+ {
+ return ListAccountTenants(_profile.Context.Account, _profile.Context.Environment, null, ShowDialog.Never);
+ }
+
+ private IEnumerable ListSubscriptionsForTenant(AzureAccount account, AzureEnvironment environment,
+ SecureString password, ShowDialog promptBehavior, string tenantId)
+ {
+ var accessToken = AzureSession.AuthenticationFactory.Authenticate(
+ account,
+ environment,
+ tenantId,
+ password,
+ promptBehavior);
+ using (var subscriptionClient = AzureSession.ClientFactory.CreateCustomClient(
+ new TokenCloudCredentials(accessToken.AccessToken),
+ environment.GetEndpointAsUri(AzureEnvironment.Endpoint.ResourceManager)))
+ {
+ var subscriptions = subscriptionClient.Subscriptions.List();
+ if (subscriptions != null && subscriptions.Subscriptions != null)
+ {
+ return
+ subscriptions.Subscriptions.Select(
+ (s) =>
+ s.ToAzureSubscription(new AzureContext(_profile.Context.Subscription, account,
+ environment, CreateTenantFromString(tenantId))));
+ }
+
+ return null;
+ }
+ }
+
+ public IEnumerable ListSubscriptions(string tenant)
+ {
+ return ListSubscriptionsForTenant(_profile.Context.Account, _profile.Context.Environment, null,
+ ShowDialog.Never, tenant);
+ }
+
+ public IEnumerable ListSubscriptions()
+ {
+ List subscriptions = new List();
+ foreach (var tenant in ListTenants())
+ {
+ try
+ {
+ subscriptions.AddRange(ListSubscriptions(tenant.Id.ToString()));
+ }
+ catch (AadAuthenticationException)
+ {
+ WriteWarningMessage(string.Format("Could not authenticate user account {0} with tenant {1}. " +
+ "Subscriptions in this tenant will not be listed. Please login again using Login-AzureRMAccount " +
+ "to view the subscriptions in this tenant.", _profile.Context.Account, tenant));
+ }
+
+ }
+
+ return subscriptions;
+ }
+
private void WriteWarningMessage(string message)
{
if (WarningLog != null)
@@ -240,5 +316,21 @@ private void WriteWarningMessage(string message)
WarningLog(message);
}
}
+
+ private static AzureTenant CreateTenantFromString(string tenantOrDomain)
+ {
+ AzureTenant result = new AzureTenant();
+ Guid id;
+ if (Guid.TryParse(tenantOrDomain, out id))
+ {
+ result.Id = id;
+ }
+ else
+ {
+ result.Domain = tenantOrDomain;
+ }
+
+ return result;
+ }
}
}
diff --git a/src/Common/Commands.ResourceManager.Common/packages.config b/src/Common/Commands.ResourceManager.Common/packages.config
index dd635905d17b..8b3394fd6012 100644
--- a/src/Common/Commands.ResourceManager.Common/packages.config
+++ b/src/Common/Commands.ResourceManager.Common/packages.config
@@ -16,4 +16,4 @@
-
+
\ No newline at end of file
diff --git a/src/Common/Commands.ResourceManager.Profile.Test/AzureRMProfileTests.cs b/src/Common/Commands.ResourceManager.Profile.Test/AzureRMProfileTests.cs
new file mode 100644
index 000000000000..8ca2d32b944a
--- /dev/null
+++ b/src/Common/Commands.ResourceManager.Profile.Test/AzureRMProfileTests.cs
@@ -0,0 +1,135 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using Microsoft.Azure.Common.Authentication;
+using Microsoft.Azure.Common.Authentication.Models;
+using System.Linq;
+using Xunit;
+using System;
+using Microsoft.WindowsAzure.Commands.Common.Test.Mocks;
+using System.Collections.Generic;
+using Microsoft.WindowsAzure.Commands.ScenarioTest;
+
+namespace Microsoft.Azure.Commands.ResourceManager.Common.Test
+{
+
+ public class AzureRMProfileTests
+ {
+ private const string DefaultAccount = "admin@contoso.com";
+ private static Guid DefaultSubscription = Guid.NewGuid();
+ private static string DefaultSubscriptionName = "Contoso Subscription";
+ private static string DefaultDomain = "contoso.com";
+ private static Guid DefaultTenant = Guid.NewGuid();
+
+ private static RMProfileClient SetupTestEnvironment(List tenants, params List[] subscriptionLists)
+ {
+ AzureSession.AuthenticationFactory = new MockTokenAuthenticationFactory(DefaultAccount,
+ Guid.NewGuid().ToString(), DefaultTenant.ToString());
+ var subscriptionList = new Queue>(subscriptionLists);
+ var clientFactory = new MockSubscriptionClientFactory(tenants, subscriptionList);
+ var mock = new MockClientFactory(new List
- False
..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
@@ -72,6 +72,10 @@
False
..\..\packages\Microsoft.Azure.Management.Resources.2.18.7-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+
+ ..\..\packages\Microsoft.Azure.Test.Framework.1.0.5715.36130-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll
+ True
+
..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5715.36130-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll
True
@@ -178,7 +182,11 @@
+
+
+
+
@@ -186,8 +194,14 @@
+
+ PreserveNewest
+
+
+ PreserveNewest
+
@@ -203,6 +217,7 @@
Commands.ScenarioTests.ResourceManager.Common
+
diff --git a/src/Common/Commands.ResourceManager.Profile.Test/MockSubscriptionClientFactory.cs b/src/Common/Commands.ResourceManager.Profile.Test/MockSubscriptionClientFactory.cs
new file mode 100644
index 000000000000..6ae2407c865f
--- /dev/null
+++ b/src/Common/Commands.ResourceManager.Profile.Test/MockSubscriptionClientFactory.cs
@@ -0,0 +1,120 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.Azure.Subscriptions;
+using Microsoft.Azure.Subscriptions.Models;
+using Moq;
+
+namespace Microsoft.Azure.Commands.ResourceManager.Common.Test
+{
+ public class MockSubscriptionClientFactory
+ {
+ private IList _tenants;
+ private Queue> _subscriptions;
+ private HashSet _subscriptionSet;
+ public MockSubscriptionClientFactory(List tenants, Queue> subscriptions)
+ {
+ _tenants = tenants;
+ _subscriptions = new Queue>();
+ _subscriptionSet = new HashSet();
+ foreach (var subscriptionList in subscriptions)
+ {
+ _subscriptions.Enqueue(subscriptionList);
+ foreach (var subscription in subscriptionList)
+ {
+ _subscriptionSet.Add(subscription);
+ }
+ }
+ }
+
+ public SubscriptionClient GetSubscriptionClient()
+ {
+ var tenantMock = new Mock();
+ tenantMock.Setup(t => t.ListAsync(It.IsAny()))
+ .Returns(
+ (CancellationToken token) =>
+ Task.FromResult(new TenantListResult()
+ {
+ StatusCode = HttpStatusCode.OK,
+ RequestId = Guid.NewGuid().ToString(),
+ TenantIds = _tenants.Select((k) => new TenantIdDescription() { Id = k, TenantId = k }).ToList()
+ }));
+ var subscriptionMock = new Mock();
+ subscriptionMock.Setup(
+ s => s.GetAsync(It.IsAny(), It.IsAny())).Returns(
+ (string subId, CancellationToken token) =>
+ {
+ GetSubscriptionResult result = new GetSubscriptionResult
+ {
+ RequestId = Guid.NewGuid().ToString(),
+ StatusCode = HttpStatusCode.NotFound
+ };
+ if (_subscriptionSet.Contains(subId))
+ {
+ result.StatusCode = HttpStatusCode.OK;
+ result.Subscription =
+ new Subscription
+ {
+ DisplayName = "Returned Subscription",
+ Id = subId,
+ State = "Active",
+ SubscriptionId = subId
+ };
+
+ }
+
+ return Task.FromResult(result);
+ });
+ subscriptionMock.Setup(
+ (s) => s.ListAsync(It.IsAny())).Returns(
+ (CancellationToken token) =>
+ {
+ SubscriptionListResult result = null;
+ if (_subscriptions.Count > 0)
+ {
+ var subscriptionList = _subscriptions.Dequeue();
+ result = new SubscriptionListResult
+ {
+ StatusCode = HttpStatusCode.OK,
+ RequestId = Guid.NewGuid().ToString(),
+ Subscriptions =
+ new List(
+ subscriptionList.Select(
+ sub =>
+ new Subscription
+ {
+ DisplayName = "Contoso Subscription",
+ Id = sub,
+ State = "Active",
+ SubscriptionId = sub
+ }))
+ };
+ }
+
+ return Task.FromResult(result);
+ });
+ var client = new Mock();
+ client.SetupGet(c => c.Subscriptions).Returns(subscriptionMock.Object);
+ client.SetupGet(c => c.Tenants).Returns(tenantMock.Object);
+ return client.Object;
+ }
+ }
+
+}
diff --git a/src/Common/Commands.ResourceManager.Profile.Test/ProfileController.cs b/src/Common/Commands.ResourceManager.Profile.Test/ProfileController.cs
new file mode 100644
index 000000000000..742428a6a5f6
--- /dev/null
+++ b/src/Common/Commands.ResourceManager.Profile.Test/ProfileController.cs
@@ -0,0 +1,135 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net.Http;
+using System.Net.Http.Headers;
+using Microsoft.Azure.Commands.ResourceManager.Common;
+using Microsoft.Azure.Common.Authentication;
+using Microsoft.Azure.Management.Resources;
+using Microsoft.Azure.Subscriptions;
+using Microsoft.Azure.Test;
+using Microsoft.Azure.Test.HttpRecorder;
+using Microsoft.WindowsAzure.Commands.Common.Test.Mocks;
+using Microsoft.WindowsAzure.Commands.ScenarioTest;
+
+namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
+{
+ public sealed class ProfileController
+ {
+ private CSMTestEnvironmentFactory csmTestFactory;
+ private EnvironmentSetupHelper helper;
+ private const string TenantIdKey = "TenantId";
+ private const string DomainKey = "Domain";
+ private const string SubscriptionIdKey = "SubscriptionId";
+
+
+ public SubscriptionClient SubscriptionClient { get; private set; }
+
+ public string UserDomain { get; private set; }
+
+ public static ProfileController NewInstance
+ {
+ get { return new ProfileController(); }
+ }
+
+ public ProfileController()
+ {
+ helper = new EnvironmentSetupHelper();
+ }
+
+ public void RunPsTest(string tenant, params string[] scripts)
+ {
+ var callingClassType = TestUtilities.GetCallingClass(2);
+ var mockName = TestUtilities.GetCurrentMethodName(2);
+
+ RunPsTestWorkflow(
+ () => scripts,
+ // no custom initializer
+ null,
+ // no custom cleanup
+ null,
+ callingClassType,
+ mockName, tenant);
+ }
+
+ public void RunPsTestWorkflow(
+ Func scriptBuilder,
+ Action initialize,
+ Action cleanup,
+ string callingClassType,
+ string mockName, string tenant)
+ {
+ using (UndoContext context = UndoContext.Current)
+ {
+ context.Start(callingClassType, mockName);
+
+ this.csmTestFactory = new CSMTestEnvironmentFactory();
+
+ if (initialize != null)
+ {
+ initialize(this.csmTestFactory);
+ }
+
+ SetupManagementClients();
+
+ helper.SetupEnvironment(AzureModule.AzureResourceManager);
+ var oldFactory = AzureSession.AuthenticationFactory as MockTokenAuthenticationFactory;
+ AzureSession.AuthenticationFactory = new MockTokenAuthenticationFactory(oldFactory.Token.UserId, oldFactory.Token.AccessToken, tenant);
+
+ var callingClassName = callingClassType
+ .Split(new[] {"."}, StringSplitOptions.RemoveEmptyEntries)
+ .Last();
+ helper.SetupModulesFromCommon(
+ AzureModule.AzureResourceManager,
+ callingClassName + ".ps1");
+
+ try
+ {
+ if (scriptBuilder != null)
+ {
+ var psScripts = scriptBuilder();
+
+ if (psScripts != null)
+ {
+ helper.RunPowerShellTest(psScripts);
+ }
+ }
+ }
+ finally
+ {
+ if (cleanup != null)
+ {
+ cleanup();
+ }
+ }
+ }
+ }
+
+ private void SetupManagementClients()
+ {
+ SubscriptionClient = GetSubscriptionClient();
+
+ helper.SetupManagementClients(SubscriptionClient);
+ }
+
+
+ private SubscriptionClient GetSubscriptionClient()
+ {
+ return TestBase.GetServiceClient(this.csmTestFactory);
+ }
+ }
+}
diff --git a/src/Common/Commands.ResourceManager.Profile.Test/SessionRecords/Microsoft.Azure.Commands.Profile.Test.SubscriptionCmdletTests/AllParameterSetsSucceed.json b/src/Common/Commands.ResourceManager.Profile.Test/SessionRecords/Microsoft.Azure.Commands.Profile.Test.SubscriptionCmdletTests/AllParameterSetsSucceed.json
new file mode 100644
index 000000000000..6e40e34f6a17
--- /dev/null
+++ b/src/Common/Commands.ResourceManager.Profile.Test/SessionRecords/Microsoft.Azure.Commands.Profile.Test.SubscriptionCmdletTests/AllParameterSetsSucceed.json
@@ -0,0 +1,392 @@
+{
+ "Entries": [
+ {
+ "RequestUri": "/tenants?api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3RlbmFudHM/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Subscriptions.SubscriptionClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/tenants/72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\r\n },\r\n {\r\n \"id\": \"/tenants/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a\",\r\n \"tenantId\": \"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a\"\r\n },\r\n {\r\n \"id\": \"/tenants/d5f34e25-06f2-42eb-bbe1-0efebece6ed5\",\r\n \"tenantId\": \"d5f34e25-06f2-42eb-bbe1-0efebece6ed5\"\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "326"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-tenant-reads": [
+ "14994"
+ ],
+ "x-ms-request-id": [
+ "dfbcb8b4-79bd-4b49-98cd-2f48f03ab959"
+ ],
+ "x-ms-correlation-request-id": [
+ "dfbcb8b4-79bd-4b49-98cd-2f48f03ab959"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150917T092920Z:dfbcb8b4-79bd-4b49-98cd-2f48f03ab959"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Thu, 17 Sep 2015 09:29:19 GMT"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions?api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnM/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Subscriptions.SubscriptionClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/00977cdb-163f-435f-9c32-39ec8ae61f4d\",\r\n \"subscriptionId\": \"00977cdb-163f-435f-9c32-39ec8ae61f4d\",\r\n \"displayName\": \"node\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/279b0675-cf67-467f-98f0-67ae31eb540f\",\r\n \"subscriptionId\": \"279b0675-cf67-467f-98f0-67ae31eb540f\",\r\n \"displayName\": \"Azure SDK CI\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6\",\r\n \"subscriptionId\": \"2c224e7e-3ef5-431d-a57b-e71f4662e3a6\",\r\n \"displayName\": \"Node CLI Test\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/69801886-4b2b-493b-ba5b-3b26dabadadc\",\r\n \"subscriptionId\": \"69801886-4b2b-493b-ba5b-3b26dabadadc\",\r\n \"displayName\": \"WebStackAndEF_TestInfra\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/6b085460-5f21-477e-ba44-1035046e9101\",\r\n \"subscriptionId\": \"6b085460-5f21-477e-ba44-1035046e9101\",\r\n \"displayName\": \"Azure SDK Infrastructure\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/9ed7cca5-c306-4f66-9d1c-2766e67013d8\",\r\n \"subscriptionId\": \"9ed7cca5-c306-4f66-9d1c-2766e67013d8\",\r\n \"displayName\": \"FISMA Pen Testing Subscription\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/c9cbd920-c00c-427c-852b-8aaf38badaeb\",\r\n \"subscriptionId\": \"c9cbd920-c00c-427c-852b-8aaf38badaeb\",\r\n \"displayName\": \"Azure SDK Powershell Test\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d1e52cbc-b073-42e2-a0a0-c2f547118a6e\",\r\n \"subscriptionId\": \"d1e52cbc-b073-42e2-a0a0-c2f547118a6e\",\r\n \"displayName\": \"Test Subscription 1 for Migration\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c\",\r\n \"subscriptionId\": \"db1ab6f0-4769-4b27-930e-01e2ef9c123c\",\r\n \"displayName\": \"Azure SDK sandbox\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3028579c-d25b-4ab8-87fc-455abc9bb7fb\",\r\n \"subscriptionId\": \"3028579c-d25b-4ab8-87fc-455abc9bb7fb\",\r\n \"displayName\": \"WindowsOnDevices\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/b6b78feb-3074-4129-8748-42cee6c73020\",\r\n \"subscriptionId\": \"b6b78feb-3074-4129-8748-42cee6c73020\",\r\n \"displayName\": \"XFD Data Systems - Public\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "3016"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-tenant-reads": [
+ "14993"
+ ],
+ "x-ms-request-id": [
+ "3bf4c9ed-5a95-47ad-b574-3d3bab512da2"
+ ],
+ "x-ms-correlation-request-id": [
+ "3bf4c9ed-5a95-47ad-b574-3d3bab512da2"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150917T092921Z:3bf4c9ed-5a95-47ad-b574-3d3bab512da2"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Thu, 17 Sep 2015 09:29:20 GMT"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions?api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnM/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Subscriptions.SubscriptionClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/00977cdb-163f-435f-9c32-39ec8ae61f4d\",\r\n \"subscriptionId\": \"00977cdb-163f-435f-9c32-39ec8ae61f4d\",\r\n \"displayName\": \"node\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/279b0675-cf67-467f-98f0-67ae31eb540f\",\r\n \"subscriptionId\": \"279b0675-cf67-467f-98f0-67ae31eb540f\",\r\n \"displayName\": \"Azure SDK CI\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6\",\r\n \"subscriptionId\": \"2c224e7e-3ef5-431d-a57b-e71f4662e3a6\",\r\n \"displayName\": \"Node CLI Test\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/69801886-4b2b-493b-ba5b-3b26dabadadc\",\r\n \"subscriptionId\": \"69801886-4b2b-493b-ba5b-3b26dabadadc\",\r\n \"displayName\": \"WebStackAndEF_TestInfra\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/6b085460-5f21-477e-ba44-1035046e9101\",\r\n \"subscriptionId\": \"6b085460-5f21-477e-ba44-1035046e9101\",\r\n \"displayName\": \"Azure SDK Infrastructure\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/9ed7cca5-c306-4f66-9d1c-2766e67013d8\",\r\n \"subscriptionId\": \"9ed7cca5-c306-4f66-9d1c-2766e67013d8\",\r\n \"displayName\": \"FISMA Pen Testing Subscription\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/c9cbd920-c00c-427c-852b-8aaf38badaeb\",\r\n \"subscriptionId\": \"c9cbd920-c00c-427c-852b-8aaf38badaeb\",\r\n \"displayName\": \"Azure SDK Powershell Test\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d1e52cbc-b073-42e2-a0a0-c2f547118a6e\",\r\n \"subscriptionId\": \"d1e52cbc-b073-42e2-a0a0-c2f547118a6e\",\r\n \"displayName\": \"Test Subscription 1 for Migration\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c\",\r\n \"subscriptionId\": \"db1ab6f0-4769-4b27-930e-01e2ef9c123c\",\r\n \"displayName\": \"Azure SDK sandbox\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3028579c-d25b-4ab8-87fc-455abc9bb7fb\",\r\n \"subscriptionId\": \"3028579c-d25b-4ab8-87fc-455abc9bb7fb\",\r\n \"displayName\": \"WindowsOnDevices\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/b6b78feb-3074-4129-8748-42cee6c73020\",\r\n \"subscriptionId\": \"b6b78feb-3074-4129-8748-42cee6c73020\",\r\n \"displayName\": \"XFD Data Systems - Public\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "3016"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-tenant-reads": [
+ "14992"
+ ],
+ "x-ms-request-id": [
+ "f59628b0-b505-47bd-8662-b362f1585fcc"
+ ],
+ "x-ms-correlation-request-id": [
+ "f59628b0-b505-47bd-8662-b362f1585fcc"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150917T092922Z:f59628b0-b505-47bd-8662-b362f1585fcc"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Thu, 17 Sep 2015 09:29:21 GMT"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions?api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnM/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Subscriptions.SubscriptionClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/00977cdb-163f-435f-9c32-39ec8ae61f4d\",\r\n \"subscriptionId\": \"00977cdb-163f-435f-9c32-39ec8ae61f4d\",\r\n \"displayName\": \"node\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/279b0675-cf67-467f-98f0-67ae31eb540f\",\r\n \"subscriptionId\": \"279b0675-cf67-467f-98f0-67ae31eb540f\",\r\n \"displayName\": \"Azure SDK CI\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6\",\r\n \"subscriptionId\": \"2c224e7e-3ef5-431d-a57b-e71f4662e3a6\",\r\n \"displayName\": \"Node CLI Test\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/69801886-4b2b-493b-ba5b-3b26dabadadc\",\r\n \"subscriptionId\": \"69801886-4b2b-493b-ba5b-3b26dabadadc\",\r\n \"displayName\": \"WebStackAndEF_TestInfra\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/6b085460-5f21-477e-ba44-1035046e9101\",\r\n \"subscriptionId\": \"6b085460-5f21-477e-ba44-1035046e9101\",\r\n \"displayName\": \"Azure SDK Infrastructure\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/9ed7cca5-c306-4f66-9d1c-2766e67013d8\",\r\n \"subscriptionId\": \"9ed7cca5-c306-4f66-9d1c-2766e67013d8\",\r\n \"displayName\": \"FISMA Pen Testing Subscription\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/c9cbd920-c00c-427c-852b-8aaf38badaeb\",\r\n \"subscriptionId\": \"c9cbd920-c00c-427c-852b-8aaf38badaeb\",\r\n \"displayName\": \"Azure SDK Powershell Test\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d1e52cbc-b073-42e2-a0a0-c2f547118a6e\",\r\n \"subscriptionId\": \"d1e52cbc-b073-42e2-a0a0-c2f547118a6e\",\r\n \"displayName\": \"Test Subscription 1 for Migration\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c\",\r\n \"subscriptionId\": \"db1ab6f0-4769-4b27-930e-01e2ef9c123c\",\r\n \"displayName\": \"Azure SDK sandbox\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3028579c-d25b-4ab8-87fc-455abc9bb7fb\",\r\n \"subscriptionId\": \"3028579c-d25b-4ab8-87fc-455abc9bb7fb\",\r\n \"displayName\": \"WindowsOnDevices\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/b6b78feb-3074-4129-8748-42cee6c73020\",\r\n \"subscriptionId\": \"b6b78feb-3074-4129-8748-42cee6c73020\",\r\n \"displayName\": \"XFD Data Systems - Public\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "3016"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-tenant-reads": [
+ "14991"
+ ],
+ "x-ms-request-id": [
+ "c6440f00-0988-475d-94da-24d45117ed6f"
+ ],
+ "x-ms-correlation-request-id": [
+ "c6440f00-0988-475d-94da-24d45117ed6f"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150917T092923Z:c6440f00-0988-475d-94da-24d45117ed6f"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Thu, 17 Sep 2015 09:29:23 GMT"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions?api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnM/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Subscriptions.SubscriptionClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/00977cdb-163f-435f-9c32-39ec8ae61f4d\",\r\n \"subscriptionId\": \"00977cdb-163f-435f-9c32-39ec8ae61f4d\",\r\n \"displayName\": \"node\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/279b0675-cf67-467f-98f0-67ae31eb540f\",\r\n \"subscriptionId\": \"279b0675-cf67-467f-98f0-67ae31eb540f\",\r\n \"displayName\": \"Azure SDK CI\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6\",\r\n \"subscriptionId\": \"2c224e7e-3ef5-431d-a57b-e71f4662e3a6\",\r\n \"displayName\": \"Node CLI Test\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/69801886-4b2b-493b-ba5b-3b26dabadadc\",\r\n \"subscriptionId\": \"69801886-4b2b-493b-ba5b-3b26dabadadc\",\r\n \"displayName\": \"WebStackAndEF_TestInfra\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/6b085460-5f21-477e-ba44-1035046e9101\",\r\n \"subscriptionId\": \"6b085460-5f21-477e-ba44-1035046e9101\",\r\n \"displayName\": \"Azure SDK Infrastructure\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/9ed7cca5-c306-4f66-9d1c-2766e67013d8\",\r\n \"subscriptionId\": \"9ed7cca5-c306-4f66-9d1c-2766e67013d8\",\r\n \"displayName\": \"FISMA Pen Testing Subscription\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/c9cbd920-c00c-427c-852b-8aaf38badaeb\",\r\n \"subscriptionId\": \"c9cbd920-c00c-427c-852b-8aaf38badaeb\",\r\n \"displayName\": \"Azure SDK Powershell Test\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d1e52cbc-b073-42e2-a0a0-c2f547118a6e\",\r\n \"subscriptionId\": \"d1e52cbc-b073-42e2-a0a0-c2f547118a6e\",\r\n \"displayName\": \"Test Subscription 1 for Migration\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c\",\r\n \"subscriptionId\": \"db1ab6f0-4769-4b27-930e-01e2ef9c123c\",\r\n \"displayName\": \"Azure SDK sandbox\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3028579c-d25b-4ab8-87fc-455abc9bb7fb\",\r\n \"subscriptionId\": \"3028579c-d25b-4ab8-87fc-455abc9bb7fb\",\r\n \"displayName\": \"WindowsOnDevices\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/b6b78feb-3074-4129-8748-42cee6c73020\",\r\n \"subscriptionId\": \"b6b78feb-3074-4129-8748-42cee6c73020\",\r\n \"displayName\": \"XFD Data Systems - Public\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "3016"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-tenant-reads": [
+ "14990"
+ ],
+ "x-ms-request-id": [
+ "821067d5-0dda-4c06-896c-d05adda670be"
+ ],
+ "x-ms-correlation-request-id": [
+ "821067d5-0dda-4c06-896c-d05adda670be"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150917T092941Z:821067d5-0dda-4c06-896c-d05adda670be"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Thu, 17 Sep 2015 09:29:40 GMT"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions?api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnM/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Subscriptions.SubscriptionClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/00977cdb-163f-435f-9c32-39ec8ae61f4d\",\r\n \"subscriptionId\": \"00977cdb-163f-435f-9c32-39ec8ae61f4d\",\r\n \"displayName\": \"node\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/279b0675-cf67-467f-98f0-67ae31eb540f\",\r\n \"subscriptionId\": \"279b0675-cf67-467f-98f0-67ae31eb540f\",\r\n \"displayName\": \"Azure SDK CI\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6\",\r\n \"subscriptionId\": \"2c224e7e-3ef5-431d-a57b-e71f4662e3a6\",\r\n \"displayName\": \"Node CLI Test\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/69801886-4b2b-493b-ba5b-3b26dabadadc\",\r\n \"subscriptionId\": \"69801886-4b2b-493b-ba5b-3b26dabadadc\",\r\n \"displayName\": \"WebStackAndEF_TestInfra\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/6b085460-5f21-477e-ba44-1035046e9101\",\r\n \"subscriptionId\": \"6b085460-5f21-477e-ba44-1035046e9101\",\r\n \"displayName\": \"Azure SDK Infrastructure\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/9ed7cca5-c306-4f66-9d1c-2766e67013d8\",\r\n \"subscriptionId\": \"9ed7cca5-c306-4f66-9d1c-2766e67013d8\",\r\n \"displayName\": \"FISMA Pen Testing Subscription\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/c9cbd920-c00c-427c-852b-8aaf38badaeb\",\r\n \"subscriptionId\": \"c9cbd920-c00c-427c-852b-8aaf38badaeb\",\r\n \"displayName\": \"Azure SDK Powershell Test\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/d1e52cbc-b073-42e2-a0a0-c2f547118a6e\",\r\n \"subscriptionId\": \"d1e52cbc-b073-42e2-a0a0-c2f547118a6e\",\r\n \"displayName\": \"Test Subscription 1 for Migration\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c\",\r\n \"subscriptionId\": \"db1ab6f0-4769-4b27-930e-01e2ef9c123c\",\r\n \"displayName\": \"Azure SDK sandbox\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3028579c-d25b-4ab8-87fc-455abc9bb7fb\",\r\n \"subscriptionId\": \"3028579c-d25b-4ab8-87fc-455abc9bb7fb\",\r\n \"displayName\": \"WindowsOnDevices\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/b6b78feb-3074-4129-8748-42cee6c73020\",\r\n \"subscriptionId\": \"b6b78feb-3074-4129-8748-42cee6c73020\",\r\n \"displayName\": \"XFD Data Systems - Public\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "3016"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-tenant-reads": [
+ "14989"
+ ],
+ "x-ms-request-id": [
+ "41377497-013c-4147-a578-899a8c738e7c"
+ ],
+ "x-ms-correlation-request-id": [
+ "41377497-013c-4147-a578-899a8c738e7c"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150917T092941Z:41377497-013c-4147-a578-899a8c738e7c"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Thu, 17 Sep 2015 09:29:41 GMT"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/00977cdb-163f-435f-9c32-39ec8ae61f4d?api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDA5NzdjZGItMTYzZi00MzVmLTljMzItMzllYzhhZTYxZjRkP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Subscriptions.SubscriptionClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"id\": \"/subscriptions/00977cdb-163f-435f-9c32-39ec8ae61f4d\",\r\n \"subscriptionId\": \"00977cdb-163f-435f-9c32-39ec8ae61f4d\",\r\n \"displayName\": \"node\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "256"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14998"
+ ],
+ "x-ms-request-id": [
+ "0b257a33-7f01-4a98-8d98-1bc654be1159"
+ ],
+ "x-ms-correlation-request-id": [
+ "0b257a33-7f01-4a98-8d98-1bc654be1159"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150917T092923Z:0b257a33-7f01-4a98-8d98-1bc654be1159"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Thu, 17 Sep 2015 09:29:23 GMT"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/00977cdb-163f-435f-9c32-39ec8ae61f4d?api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDA5NzdjZGItMTYzZi00MzVmLTljMzItMzllYzhhZTYxZjRkP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Subscriptions.SubscriptionClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"id\": \"/subscriptions/00977cdb-163f-435f-9c32-39ec8ae61f4d\",\r\n \"subscriptionId\": \"00977cdb-163f-435f-9c32-39ec8ae61f4d\",\r\n \"displayName\": \"node\",\r\n \"state\": \"Enabled\",\r\n \"subscriptionPolicies\": {\r\n \"locationPlacementId\": \"Internal_2014-09-01\",\r\n \"quotaId\": \"Internal_2014-09-01\"\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "256"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14997"
+ ],
+ "x-ms-request-id": [
+ "ad76a94a-cb03-494f-853e-7c0a68a7766a"
+ ],
+ "x-ms-correlation-request-id": [
+ "ad76a94a-cb03-494f-853e-7c0a68a7766a"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150917T092936Z:ad76a94a-cb03-494f-853e-7c0a68a7766a"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Thu, 17 Sep 2015 09:29:36 GMT"
+ ]
+ },
+ "StatusCode": 200
+ }
+ ],
+ "Names": {},
+ "Variables": {
+ "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c"
+ }
+}
\ No newline at end of file
diff --git a/src/Common/Commands.ResourceManager.Profile.Test/SubscriptionCmdletTests.cs b/src/Common/Commands.ResourceManager.Profile.Test/SubscriptionCmdletTests.cs
new file mode 100644
index 000000000000..19c5917699ad
--- /dev/null
+++ b/src/Common/Commands.ResourceManager.Profile.Test/SubscriptionCmdletTests.cs
@@ -0,0 +1,41 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using Microsoft.WindowsAzure.Commands.Utilities.Common;
+using Microsoft.Azure.Commands.Profile;
+using Microsoft.Azure.Commands.ResourceManager.Common;
+using Microsoft.Azure.Common.Authentication;
+using Microsoft.Azure.Common.Authentication.Models;
+using Microsoft.WindowsAzure.Commands.Common.Test.Mocks;
+using Microsoft.WindowsAzure.Commands.ScenarioTest;
+using System.Linq;
+using Xunit;
+using System;
+using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
+using Hyak.Common;
+using System.Management.Automation;
+using Microsoft.Azure.Commands.Resources.Test.ScenarioTests;
+
+namespace Microsoft.Azure.Commands.Profile.Test
+{
+ public class SubscriptionCmdletTests
+ {
+ [Fact]
+ [Trait(Category.AcceptanceType, Category.CheckIn)]
+ public void AllParameterSetsSucceed()
+ {
+ ProfileController.NewInstance.RunPsTest("72f988bf-86f1-41af-91ab-2d7cd011db47", "Test-GetSubscriptionsEndToEnd");
+ }
+ }
+}
diff --git a/src/Common/Commands.ResourceManager.Profile.Test/SubscriptionCmdletTests.ps1 b/src/Common/Commands.ResourceManager.Profile.Test/SubscriptionCmdletTests.ps1
new file mode 100644
index 000000000000..6b439945edb5
--- /dev/null
+++ b/src/Common/Commands.ResourceManager.Profile.Test/SubscriptionCmdletTests.ps1
@@ -0,0 +1,35 @@
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.SYNOPSIS
+Tests each of the major parts of retrieving subscriptions in ARM mode
+#>
+function Test-GetSubscriptionsEndToEnd
+{
+ $allSubscriptions = Get-AzureRMSubscription -All
+ $firstSubscription = $allSubscriptions[0]
+ $id = $firstSubscription.Id
+ $tenant = $firstSubscription.GetProperty([Microsoft.Azure.Common.Authentication.Models.AzureSubscription+Property]::Tenants)
+ $subscription = Get-AzureRMSubscription -SubscriptionId $id -Tenant $tenant
+ Assert-True { $subscription -ne $null }
+ Assert-AreEqual $id $subscription.Id
+ $subscription = Get-AzureRMSubscription -SubscriptionId $id
+ Assert-True { $subscription -ne $null }
+ Assert-AreEqual $id $subscription.Id
+ $mostSubscriptions = Get-AzureRMSubscription
+ Assert-True {$mostSubscriptions.Count -gt 0}
+ $tenantSubscriptions = Get-AzureRMSubscription -Tenant $tenant
+ Assert-True {$tenantSubscriptions.Count -gt 0}
+}
\ No newline at end of file
diff --git a/src/Common/Commands.ResourceManager.Profile.Test/packages.config b/src/Common/Commands.ResourceManager.Profile.Test/packages.config
index 5f4f008064ef..a3082339b9ef 100644
--- a/src/Common/Commands.ResourceManager.Profile.Test/packages.config
+++ b/src/Common/Commands.ResourceManager.Profile.Test/packages.config
@@ -7,6 +7,7 @@
+
diff --git a/src/Common/Commands.ResourceManager.Profile/Commands.ResourceManager.Profile.csproj b/src/Common/Commands.ResourceManager.Profile/Commands.ResourceManager.Profile.csproj
index da64520ad578..4ebf0fd34546 100644
--- a/src/Common/Commands.ResourceManager.Profile/Commands.ResourceManager.Profile.csproj
+++ b/src/Common/Commands.ResourceManager.Profile/Commands.ResourceManager.Profile.csproj
@@ -132,11 +132,12 @@
+
-
+
True
diff --git a/src/Common/Commands.ResourceManager.Profile/GetAzureRMSubscription.cs b/src/Common/Commands.ResourceManager.Profile/GetAzureRMSubscription.cs
new file mode 100644
index 000000000000..8a42352a407e
--- /dev/null
+++ b/src/Common/Commands.ResourceManager.Profile/GetAzureRMSubscription.cs
@@ -0,0 +1,120 @@
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using Microsoft.Azure.Commands.ResourceManager.Common;
+using System.Management.Automation;
+using Microsoft.Azure.Commands.Profile.Properties;
+using Microsoft.Azure.Common.Authentication;
+using Microsoft.Azure.Common.Authentication.Models;
+
+namespace Microsoft.Azure.Commands.Profile
+{
+ [Cmdlet(VerbsCommon.Get, "AzureRMSubscription", DefaultParameterSetName = ListInTenantParameterSet),
+ OutputType(typeof(AzureSubscription))]
+ public class GetAzureRMSubscriptionCommand : AzureRMCmdlet
+ {
+ public const string ListInTenantParameterSet = "ListInTenant";
+ public const string ListAllParameterSet = "ListAll";
+
+ private RMProfileClient _client;
+
+ [Parameter(ParameterSetName= ListInTenantParameterSet, ValueFromPipelineByPropertyName = true, Mandatory=false)]
+ public string SubscriptionId { get; set; }
+
+ [Parameter(ParameterSetName = ListInTenantParameterSet, ValueFromPipelineByPropertyName = true, Mandatory = false)]
+ public string Tenant { get; set; }
+
+ [Parameter(ParameterSetName = ListAllParameterSet, Mandatory = true)]
+ public SwitchParameter All { get; set; }
+
+ protected override void BeginProcessing()
+ {
+ base.BeginProcessing();
+ _client = new RMProfileClient(DefaultProfile);
+ _client.WarningLog = (s) => WriteWarning(s);
+ }
+
+ protected override void ProcessRecord()
+ {
+ if (this.ParameterSetName == ListAllParameterSet)
+ {
+ try
+ {
+ WriteObject(_client.ListSubscriptions(), enumerateCollection: true);
+ }
+ catch (AadAuthenticationException exception)
+ {
+ var account = DefaultContext.Account == null || DefaultContext.Account.Id == null
+ ? Resources.NoAccountProvided
+ : DefaultContext.Account.Id;
+ throw new PSInvalidOperationException(string.Format(Resources.CommonTenantAuthFailed, account), exception);
+ }
+ }
+ else if (!string.IsNullOrWhiteSpace(this.SubscriptionId))
+ {
+ var tenant = EnsureValidTenant();
+ AzureSubscription result;
+ try
+ {
+ if (!this._client.TryGetSubscription(tenant, this.SubscriptionId, out result))
+ {
+ ThrowSubscriptionNotFoundError(this.Tenant, this.SubscriptionId);
+ }
+
+ WriteObject(result);
+ }
+ catch (AadAuthenticationException exception)
+ {
+ ThrowTenantAuthenticationError(tenant, exception);
+ throw;
+ }
+
+ }
+ else
+ {
+ var tenant = EnsureValidTenant();
+ try
+ {
+ WriteObject(_client.ListSubscriptions(tenant), enumerateCollection: true);
+ }
+ catch (AadAuthenticationException exception)
+ {
+ ThrowTenantAuthenticationError(tenant, exception);
+ throw;
+ }
+ }
+ }
+
+ private void ThrowSubscriptionNotFoundError(string tenant, string subscription)
+ {
+ throw new PSArgumentException(string.Format(Resources.SubscriptionNotFoundError, subscription, tenant));
+ }
+
+ private void ThrowTenantAuthenticationError(string tenant, AadAuthenticationException exception)
+ {
+ throw new PSArgumentException(string.Format(Resources.TenantAuthFailed, tenant), exception);
+ }
+
+ private string EnsureValidTenant()
+ {
+ var tenant = this.Tenant;
+ if (string.IsNullOrWhiteSpace(tenant) && (DefaultContext.Tenant == null ||
+ DefaultContext.Tenant.Id == null))
+ {
+ throw new PSArgumentException(Resources.NoValidTenant);
+ }
+
+ return tenant ?? DefaultContext.Tenant.Id.ToString();
+ }
+ }
+}
diff --git a/src/Common/Commands.ResourceManager.Profile/Properties/Resources.Designer.cs b/src/Common/Commands.ResourceManager.Profile/Properties/Resources.Designer.cs
index dd79754a58a3..074f68f865e5 100644
--- a/src/Common/Commands.ResourceManager.Profile/Properties/Resources.Designer.cs
+++ b/src/Common/Commands.ResourceManager.Profile/Properties/Resources.Designer.cs
@@ -68,5 +68,50 @@ internal static string AzureProfileMustNotBeNull {
return ResourceManager.GetString("AzureProfileMustNotBeNull", resourceCulture);
}
}
+
+ ///
+ /// Looks up a localized string similar to Could not authenticate your user account {0} with the common tenant. Please login again using Login-AzureRMAccount..
+ ///
+ internal static string CommonTenantAuthFailed {
+ get {
+ return ResourceManager.GetString("CommonTenantAuthFailed", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to (no account provided).
+ ///
+ internal static string NoAccountProvided {
+ get {
+ return ResourceManager.GetString("NoAccountProvided", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Please provide a valid tenant Id on the command line or execute Login-AzureRMAccount..
+ ///
+ internal static string NoValidTenant {
+ get {
+ return ResourceManager.GetString("NoValidTenant", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Subscription {0} was not found in tenant {1}. Please verify that the subscription exists in this tenant..
+ ///
+ internal static string SubscriptionNotFoundError {
+ get {
+ return ResourceManager.GetString("SubscriptionNotFoundError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Could not authenticate with tenant {0}. Please ensure that your account has access to this tenant and log in with Login-AzureRMAccount.
+ ///
+ internal static string TenantAuthFailed {
+ get {
+ return ResourceManager.GetString("TenantAuthFailed", resourceCulture);
+ }
+ }
}
}
diff --git a/src/Common/Commands.ResourceManager.Profile/Properties/Resources.resx b/src/Common/Commands.ResourceManager.Profile/Properties/Resources.resx
index c868836664ff..59a19b8d2483 100644
--- a/src/Common/Commands.ResourceManager.Profile/Properties/Resources.resx
+++ b/src/Common/Commands.ResourceManager.Profile/Properties/Resources.resx
@@ -120,4 +120,19 @@
Selected profile must not be null.
+
+ Could not authenticate your user account {0} with the common tenant. Please login again using Login-AzureRMAccount.
+
+
+ (no account provided)
+
+
+ Please provide a valid tenant Id on the command line or execute Login-AzureRMAccount.
+
+
+ Subscription {0} was not found in tenant {1}. Please verify that the subscription exists in this tenant.
+
+
+ Could not authenticate with tenant {0}. Please ensure that your account has access to this tenant and log in with Login-AzureRMAccount
+
\ No newline at end of file
diff --git a/src/Common/Commands.ScenarioTests.ResourceManager.Common/Commands.ScenarioTests.ResourceManager.Common.csproj b/src/Common/Commands.ScenarioTests.ResourceManager.Common/Commands.ScenarioTests.ResourceManager.Common.csproj
index 2e10370f61d9..f0b77bcd41fb 100644
--- a/src/Common/Commands.ScenarioTests.ResourceManager.Common/Commands.ScenarioTests.ResourceManager.Common.csproj
+++ b/src/Common/Commands.ScenarioTests.ResourceManager.Common/Commands.ScenarioTests.ResourceManager.Common.csproj
@@ -46,8 +46,8 @@
..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
- False
..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockAccessToken.cs b/src/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockAccessToken.cs
index 4acccb09d00f..47bf4b27e527 100644
--- a/src/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockAccessToken.cs
+++ b/src/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockAccessToken.cs
@@ -19,6 +19,7 @@ namespace Microsoft.WindowsAzure.Commands.Common.Test.Mocks
{
public class MockAccessToken : IAccessToken
{
+ private string _tenantId = String.Empty;
public void AuthorizeRequest(Action authTokenSetter)
{
authTokenSetter("Bearer", AccessToken);
@@ -30,7 +31,8 @@ public void AuthorizeRequest(Action authTokenSetter)
public string TenantId
{
- get { return string.Empty; }
+ get { return _tenantId; }
+ set { _tenantId = value; }
}
}
}
diff --git a/src/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockTokenAuthenticationFactory.cs b/src/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockTokenAuthenticationFactory.cs
index da443729d35b..db1e257ff57f 100644
--- a/src/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockTokenAuthenticationFactory.cs
+++ b/src/Common/Commands.ScenarioTests.ResourceManager.Common/Mocks/MockTokenAuthenticationFactory.cs
@@ -50,12 +50,26 @@ public MockTokenAuthenticationFactory(string userId, string accessToken)
{
UserId = userId,
LoginType = LoginType.OrgId,
- AccessToken = accessToken
+ AccessToken = accessToken,
};
TokenProvider = ((account, environment, tenant) => Token);
}
+ public MockTokenAuthenticationFactory(string userId, string accessToken, string tenantId)
+ {
+ Token = new MockAccessToken
+ {
+ UserId = userId,
+ LoginType = LoginType.OrgId,
+ AccessToken = accessToken,
+ TenantId = tenantId
+ };
+
+ TokenProvider = ((account, environment, tenant) => Token);
+ }
+
+
public IAccessToken Authenticate(
AzureAccount account,
AzureEnvironment environment,
diff --git a/src/ResourceManager.sln b/src/ResourceManager.sln
index fd55ccd5e9e2..3ef450e2e4cb 100644
--- a/src/ResourceManager.sln
+++ b/src/ResourceManager.sln
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 14
-VisualStudioVersion = 14.0.23107.0
+# Visual Studio 2013
+VisualStudioVersion = 12.0.40629.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8531411A-0137-4E27-9C5E-49E07C245048}"
ProjectSection(SolutionItems) = preProject
diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands.ApiManagement.ServiceManagement.csproj b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands.ApiManagement.ServiceManagement.csproj
index f1062a23ecb4..a373866a0fdf 100644
--- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands.ApiManagement.ServiceManagement.csproj
+++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands.ApiManagement.ServiceManagement.csproj
@@ -60,12 +60,16 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
- False
..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
+ ..\..\..\packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll
+ True
+
False
..\..\..\packages\Microsoft.Azure.Management.ApiManagement.1.0.2-preview\lib\net40\Microsoft.Azure.Management.ApiManagement.dll
diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/packages.config b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/packages.config
index 1604746b7888..5fcdc5862226 100644
--- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/packages.config
+++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/packages.config
@@ -5,6 +5,7 @@
+
@@ -22,4 +23,4 @@
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/Commands.ApiManagement.Test.csproj b/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/Commands.ApiManagement.Test.csproj
index 1232efbd99c2..7c139d66825b 100644
--- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/Commands.ApiManagement.Test.csproj
+++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/Commands.ApiManagement.Test.csproj
@@ -42,8 +42,8 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
- False
..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
False
diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands.ApiManagement.csproj b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands.ApiManagement.csproj
index 0f6270c4329e..708c83de9b5a 100644
--- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands.ApiManagement.csproj
+++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands.ApiManagement.csproj
@@ -65,6 +65,10 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
+ ..\..\..\packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll
+ True
+
False
..\..\..\packages\Microsoft.Azure.Management.ApiManagement.1.0.2-preview\lib\net40\Microsoft.Azure.Management.ApiManagement.dll
diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/packages.config b/src/ResourceManager/ApiManagement/Commands.ApiManagement/packages.config
index 1604746b7888..5fcdc5862226 100644
--- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/packages.config
+++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/packages.config
@@ -5,6 +5,7 @@
+
@@ -22,4 +23,4 @@
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/Commands.ApiManagement.ServiceManagement.Test.csproj b/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/Commands.ApiManagement.ServiceManagement.Test.csproj
index c60eeec824e9..a832f12d73cb 100644
--- a/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/Commands.ApiManagement.ServiceManagement.Test.csproj
+++ b/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/Commands.ApiManagement.ServiceManagement.Test.csproj
@@ -42,8 +42,8 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
- False
..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
False
diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/Commands.ResourceManagement.Automation.Test.csproj b/src/ResourceManager/Automation/Commands.Automation.Test/Commands.ResourceManagement.Automation.Test.csproj
index 0fce7e9967e9..8a4a1cfb65a6 100644
--- a/src/ResourceManager/Automation/Commands.Automation.Test/Commands.ResourceManagement.Automation.Test.csproj
+++ b/src/ResourceManager/Automation/Commands.Automation.Test/Commands.ResourceManagement.Automation.Test.csproj
@@ -57,8 +57,8 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
- False
..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ResourceManager/Automation/Commands.Automation/Commands.ResourceManagement.Automation.csproj b/src/ResourceManager/Automation/Commands.Automation/Commands.ResourceManagement.Automation.csproj
index afe38ea6c848..4a9eee5e2461 100644
--- a/src/ResourceManager/Automation/Commands.Automation/Commands.ResourceManagement.Automation.csproj
+++ b/src/ResourceManager/Automation/Commands.Automation/Commands.ResourceManagement.Automation.csproj
@@ -60,8 +60,8 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
- False
..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
False
diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/Commands.AzureBackup.Test.csproj b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/Commands.AzureBackup.Test.csproj
index 9a6fa71997e5..8e06a760b7cb 100644
--- a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/Commands.AzureBackup.Test.csproj
+++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/Commands.AzureBackup.Test.csproj
@@ -36,8 +36,8 @@
- False
..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
..\..\..\packages\Microsoft.Azure.Management.BackupServices.1.0.4-preview\lib\net40\Microsoft.Azure.Management.BackupServicesManagement.dll
diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Commands.AzureBackup.csproj b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Commands.AzureBackup.csproj
index df978f1c1959..a91979be3e21 100644
--- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Commands.AzureBackup.csproj
+++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Commands.AzureBackup.csproj
@@ -50,8 +50,8 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
- False
..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj
index 3154f653d1b9..fde04cfa7403 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj
@@ -51,8 +51,8 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
- False
..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/packages.config b/src/ResourceManager/AzureBatch/Commands.Batch.Test/packages.config
index e14354c57cf3..a1b2dd645320 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/packages.config
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/packages.config
@@ -30,4 +30,4 @@
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Commands.Batch.csproj b/src/ResourceManager/AzureBatch/Commands.Batch/Commands.Batch.csproj
index 4147d0850747..ccc67aab8f93 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch/Commands.Batch.csproj
+++ b/src/ResourceManager/AzureBatch/Commands.Batch/Commands.Batch.csproj
@@ -52,8 +52,8 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
- False
..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
@@ -104,9 +104,9 @@
..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.1.8.0.0\lib\net35-full\Microsoft.WindowsAzure.Configuration.dll
-
- False
- ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+
+ ..\..\..\packages\WindowsAzure.Storage.4.3.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+ True
False
@@ -139,9 +139,9 @@
..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll
-
- False
- ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
+
+ ..\..\..\packages\System.Spatial.5.6.2\lib\net40\System.Spatial.dll
+ True
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/packages.config b/src/ResourceManager/AzureBatch/Commands.Batch/packages.config
index 94d26a1e6c2b..15b7a9cc80ad 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch/packages.config
+++ b/src/ResourceManager/AzureBatch/Commands.Batch/packages.config
@@ -20,6 +20,6 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/src/ResourceManager/Commerce/Commands.UsageAggregates/packages.config b/src/ResourceManager/Commerce/Commands.UsageAggregates/packages.config
index 6dc202190a86..a95b798c8f16 100644
--- a/src/ResourceManager/Commerce/Commands.UsageAggregates/packages.config
+++ b/src/ResourceManager/Commerce/Commands.UsageAggregates/packages.config
@@ -1,9 +1,9 @@
-
+
diff --git a/src/ResourceManager/Compute/Commands.Compute.Test/Commands.Compute.Test.csproj b/src/ResourceManager/Compute/Commands.Compute.Test/Commands.Compute.Test.csproj
index 0b84fc0e2ab7..4a4e5d7a5b91 100644
--- a/src/ResourceManager/Compute/Commands.Compute.Test/Commands.Compute.Test.csproj
+++ b/src/ResourceManager/Compute/Commands.Compute.Test/Commands.Compute.Test.csproj
@@ -50,8 +50,8 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
- False
..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ResourceManager/Compute/Commands.Compute/Commands.Compute.csproj b/src/ResourceManager/Compute/Commands.Compute/Commands.Compute.csproj
index 270f69dd9e74..cc41d2f23ac4 100644
--- a/src/ResourceManager/Compute/Commands.Compute/Commands.Compute.csproj
+++ b/src/ResourceManager/Compute/Commands.Compute/Commands.Compute.csproj
@@ -59,8 +59,8 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
- False
..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
@@ -72,6 +72,10 @@
False
..\..\..\packages\Microsoft.Azure.Graph.RBAC.1.7.0-preview\lib\net40\Microsoft.Azure.Graph.RBAC.dll
+
+ ..\..\..\packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll
+ True
+
..\..\..\packages\Microsoft.Azure.Management.Authorization.1.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll
True
diff --git a/src/ResourceManager/Compute/Commands.Compute/packages.config b/src/ResourceManager/Compute/Commands.Compute/packages.config
index 80e26de1ad16..9daf2eaa1c77 100644
--- a/src/ResourceManager/Compute/Commands.Compute/packages.config
+++ b/src/ResourceManager/Compute/Commands.Compute/packages.config
@@ -7,6 +7,7 @@
+
@@ -25,4 +26,4 @@
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj
index 31eff11607e0..15d410ede3e6 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj
@@ -49,8 +49,8 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
- False
..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config
index bf9dde869710..41db87b08c75 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config
@@ -7,10 +7,10 @@
+
-
@@ -30,4 +30,4 @@
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj b/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj
index 10b32e46e218..f29042ee0d5c 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj
@@ -61,6 +61,10 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
+ ..\..\..\packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll
+ True
+
..\..\..\packages\Microsoft.Azure.Management.DataFactories.3.0.0\lib\net45\Microsoft.Azure.Management.DataFactories.dll
True
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/packages.config b/src/ResourceManager/DataFactories/Commands.DataFactories/packages.config
index 3288ea2144f4..4f83a6b163b0 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories/packages.config
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories/packages.config
@@ -4,8 +4,9 @@
-
+
+
@@ -21,4 +22,4 @@
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/Dns/Commands.Dns.Test/Commands.Dns.Test.csproj b/src/ResourceManager/Dns/Commands.Dns.Test/Commands.Dns.Test.csproj
index e80dfe7074e3..7ba5daab3298 100644
--- a/src/ResourceManager/Dns/Commands.Dns.Test/Commands.Dns.Test.csproj
+++ b/src/ResourceManager/Dns/Commands.Dns.Test/Commands.Dns.Test.csproj
@@ -52,8 +52,8 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
- False
..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
False
diff --git a/src/ResourceManager/Dns/Commands.Dns/packages.config b/src/ResourceManager/Dns/Commands.Dns/packages.config
index d860c091c453..39bd23233a55 100644
--- a/src/ResourceManager/Dns/Commands.Dns/packages.config
+++ b/src/ResourceManager/Dns/Commands.Dns/packages.config
@@ -19,4 +19,4 @@
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/Commands.HDInsight.csproj b/src/ResourceManager/HDInsight/Commands.HDInsight/Commands.HDInsight.csproj
index a450d1eecc40..211c1209b06a 100644
--- a/src/ResourceManager/HDInsight/Commands.HDInsight/Commands.HDInsight.csproj
+++ b/src/ResourceManager/HDInsight/Commands.HDInsight/Commands.HDInsight.csproj
@@ -95,8 +95,9 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
-
+
..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/packages.config b/src/ResourceManager/HDInsight/Commands.HDInsight/packages.config
index 9aeeef0ef5fe..71414dc901ac 100644
--- a/src/ResourceManager/HDInsight/Commands.HDInsight/packages.config
+++ b/src/ResourceManager/HDInsight/Commands.HDInsight/packages.config
@@ -11,15 +11,15 @@
-
-
-
+
+
+
-
-
+
+
\ No newline at end of file
diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/Commands.Insights.Test.csproj b/src/ResourceManager/Insights/Commands.Insights.Test/Commands.Insights.Test.csproj
index 3138f2f5b409..fd680c6a1243 100644
--- a/src/ResourceManager/Insights/Commands.Insights.Test/Commands.Insights.Test.csproj
+++ b/src/ResourceManager/Insights/Commands.Insights.Test/Commands.Insights.Test.csproj
@@ -51,8 +51,8 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
- False
..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/packages.config b/src/ResourceManager/Insights/Commands.Insights.Test/packages.config
index 5497df631ea9..6bb50d279ba9 100644
--- a/src/ResourceManager/Insights/Commands.Insights.Test/packages.config
+++ b/src/ResourceManager/Insights/Commands.Insights.Test/packages.config
@@ -26,4 +26,4 @@
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/Insights/Commands.Insights/packages.config b/src/ResourceManager/Insights/Commands.Insights/packages.config
index 74a28153c5eb..042cf78bd74b 100644
--- a/src/ResourceManager/Insights/Commands.Insights/packages.config
+++ b/src/ResourceManager/Insights/Commands.Insights/packages.config
@@ -9,9 +9,9 @@
-
-
-
+
+
+
@@ -20,4 +20,4 @@
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Commands.KeyVault.Test.csproj b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Commands.KeyVault.Test.csproj
index fc6bdee9c2a7..a90e98a7629d 100644
--- a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Commands.KeyVault.Test.csproj
+++ b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Commands.KeyVault.Test.csproj
@@ -57,8 +57,8 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
- False
..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
False
@@ -72,7 +72,7 @@
..\..\..\packages\Microsoft.Azure.KeyVault.1.0.0\lib\net45\Microsoft.Azure.KeyVault.dll
- ..\..\..\packages\Microsoft.Azure.Management.Authorization.1.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll
+ ..\..\..\packages\Microsoft.Azure.Management.Authorization.1.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll
False
diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands.KeyVault.csproj b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands.KeyVault.csproj
index 301fb5440d58..65cc16220757 100644
--- a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands.KeyVault.csproj
+++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands.KeyVault.csproj
@@ -128,7 +128,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Management.Authorization.1.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll
+ ..\..\..\packages\Microsoft.Azure.Management.Authorization.1.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll
False
diff --git a/src/ResourceManager/Network/Commands.Network.Test/Commands.Network.Test.csproj b/src/ResourceManager/Network/Commands.Network.Test/Commands.Network.Test.csproj
index 42c388171390..97824e1a4fbe 100644
--- a/src/ResourceManager/Network/Commands.Network.Test/Commands.Network.Test.csproj
+++ b/src/ResourceManager/Network/Commands.Network.Test/Commands.Network.Test.csproj
@@ -50,8 +50,8 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
- False
..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ResourceManager/Network/Commands.Network/Commands.Network.csproj b/src/ResourceManager/Network/Commands.Network/Commands.Network.csproj
index 726066148043..d308cd89ae1f 100644
--- a/src/ResourceManager/Network/Commands.Network/Commands.Network.csproj
+++ b/src/ResourceManager/Network/Commands.Network/Commands.Network.csproj
@@ -68,6 +68,10 @@
False
..\..\..\packages\Microsoft.Azure.Graph.RBAC.1.7.0-preview\lib\net40\Microsoft.Azure.Graph.RBAC.dll
+
+ ..\..\..\packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll
+ True
+
False
..\..\..\packages\Microsoft.Azure.Management.Authorization.1.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll
diff --git a/src/ResourceManager/Network/Commands.Network/packages.config b/src/ResourceManager/Network/Commands.Network/packages.config
index d9b3a61ebf51..e90727ae2c78 100644
--- a/src/ResourceManager/Network/Commands.Network/packages.config
+++ b/src/ResourceManager/Network/Commands.Network/packages.config
@@ -7,6 +7,7 @@
+
@@ -23,4 +24,4 @@
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/Commands.OperationalInsights.Test.csproj b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/Commands.OperationalInsights.Test.csproj
index 1ec8476dc57e..b24c7d69ffd6 100644
--- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/Commands.OperationalInsights.Test.csproj
+++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/Commands.OperationalInsights.Test.csproj
@@ -48,8 +48,8 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
- False
..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Commands.RedisCache.Test.csproj b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Commands.RedisCache.Test.csproj
index 653a2ae43b84..e2c843ed3658 100644
--- a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Commands.RedisCache.Test.csproj
+++ b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Commands.RedisCache.Test.csproj
@@ -50,8 +50,8 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
- False
..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj b/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj
index c684b11a70ef..cf2da5ac2723 100644
--- a/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj
+++ b/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj
@@ -51,8 +51,8 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
- False
..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
@@ -70,7 +70,7 @@
..\..\..\packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll
-
+
..\..\..\packages\Microsoft.Azure.Management.Authorization.1.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll
diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/packages.config b/src/ResourceManager/Resources/Commands.Resources.Test/packages.config
index 1167d9f79303..5d8005f0b0fa 100644
--- a/src/ResourceManager/Resources/Commands.Resources.Test/packages.config
+++ b/src/ResourceManager/Resources/Commands.Resources.Test/packages.config
@@ -30,4 +30,4 @@
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/Commands.SiteRecovery.Test.csproj b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/Commands.SiteRecovery.Test.csproj
index ed756783defc..15be44670fc2 100644
--- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/Commands.SiteRecovery.Test.csproj
+++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/Commands.SiteRecovery.Test.csproj
@@ -35,8 +35,8 @@
- False
..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
..\..\..\packages\Microsoft.Azure.Management.SiteRecovery.0.1.1-preview\lib\net40\Microsoft.Azure.Management.SiteRecovery.dll
diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/packages.config b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/packages.config
index 708a2e893f7c..a8552a4e8425 100644
--- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/packages.config
+++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/packages.config
@@ -10,8 +10,8 @@
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj b/src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj
index 91e7fa009f2b..7f079315abbd 100644
--- a/src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj
+++ b/src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj
@@ -47,6 +47,10 @@
..\..\..\packages\Hyak.Common.1.0.2\lib\net45\Hyak.Common.dll
+
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
+
..\..\..\packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll
True
@@ -54,10 +58,6 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
-
- False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
-
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/packages.config b/src/ResourceManager/Sql/Commands.Sql.Test/packages.config
index 2617e1c0d13a..0fdf81fbb685 100644
--- a/src/ResourceManager/Sql/Commands.Sql.Test/packages.config
+++ b/src/ResourceManager/Sql/Commands.Sql.Test/packages.config
@@ -5,8 +5,8 @@
-
+
@@ -31,4 +31,4 @@
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj b/src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj
index 4712a1dc940f..6354d244e0f8 100644
--- a/src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj
+++ b/src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj
@@ -242,18 +242,22 @@
False
..\..\..\packages\Hyak.Common.1.0.2\lib\net45\Hyak.Common.dll
-
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.1.3-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
- True
-
False
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
+
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
+
False
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
+ ..\..\..\packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll
+ True
+
..\..\..\packages\Microsoft.Azure.Management.Sql.0.37.0-prerelease\lib\net40\Microsoft.Azure.Management.Sql.dll
False
diff --git a/src/ResourceManager/Sql/Commands.Sql/packages.config b/src/ResourceManager/Sql/Commands.Sql/packages.config
index f527caa13bc6..19e2a9ef1301 100644
--- a/src/ResourceManager/Sql/Commands.Sql/packages.config
+++ b/src/ResourceManager/Sql/Commands.Sql/packages.config
@@ -4,6 +4,7 @@
+
@@ -23,4 +24,4 @@
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/Storage/Commands.Management.Storage.Test/Commands.Management.Storage.Test.csproj b/src/ResourceManager/Storage/Commands.Management.Storage.Test/Commands.Management.Storage.Test.csproj
index c91014efcd0e..158f0c1f4c4c 100644
--- a/src/ResourceManager/Storage/Commands.Management.Storage.Test/Commands.Management.Storage.Test.csproj
+++ b/src/ResourceManager/Storage/Commands.Management.Storage.Test/Commands.Management.Storage.Test.csproj
@@ -39,8 +39,9 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
-
+
..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ResourceManager/Storage/Commands.Management.Storage.Test/packages.config b/src/ResourceManager/Storage/Commands.Management.Storage.Test/packages.config
index bc9c0ecd8754..5b24dce45356 100644
--- a/src/ResourceManager/Storage/Commands.Management.Storage.Test/packages.config
+++ b/src/ResourceManager/Storage/Commands.Management.Storage.Test/packages.config
@@ -20,4 +20,4 @@
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/Storage/Commands.Management.Storage/packages.config b/src/ResourceManager/Storage/Commands.Management.Storage/packages.config
index 815d9d2d9121..c9df8289e4c5 100644
--- a/src/ResourceManager/Storage/Commands.Management.Storage/packages.config
+++ b/src/ResourceManager/Storage/Commands.Management.Storage/packages.config
@@ -10,7 +10,7 @@
-
-
+
+
\ No newline at end of file
diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/Commands.StreamAnalytics.Test.csproj b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/Commands.StreamAnalytics.Test.csproj
index 044c8493fac9..bebfe07a6c90 100644
--- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/Commands.StreamAnalytics.Test.csproj
+++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/Commands.StreamAnalytics.Test.csproj
@@ -48,8 +48,8 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
- False
..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/packages.config b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/packages.config
index c058b8c9da60..3de3f7ab6aad 100644
--- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/packages.config
+++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/packages.config
@@ -30,4 +30,4 @@
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Commands.StreamAnalytics.csproj b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Commands.StreamAnalytics.csproj
index 7e4a221b8c54..6c0e1ca7313b 100644
--- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Commands.StreamAnalytics.csproj
+++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Commands.StreamAnalytics.csproj
@@ -61,6 +61,10 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
+ ..\..\..\packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll
+ True
+
False
..\..\..\packages\Microsoft.Azure.Management.StreamAnalytics.1.6.0\lib\net40\Microsoft.Azure.Management.StreamAnalytics.dll
diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/packages.config b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/packages.config
index a59a830a3a99..198350208389 100644
--- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/packages.config
+++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/packages.config
@@ -4,6 +4,7 @@
+
@@ -20,4 +21,4 @@
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/Commands.TrafficManager2.Test.csproj b/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/Commands.TrafficManager2.Test.csproj
index 6fdfd29a298d..69a231d37a77 100644
--- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/Commands.TrafficManager2.Test.csproj
+++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/Commands.TrafficManager2.Test.csproj
@@ -45,8 +45,8 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
- False
..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
False
diff --git a/src/ResourceManager/Websites/Commands.Websites.Test/Commands.Websites.Test.csproj b/src/ResourceManager/Websites/Commands.Websites.Test/Commands.Websites.Test.csproj
index a1507f1651eb..783d79316968 100644
--- a/src/ResourceManager/Websites/Commands.Websites.Test/Commands.Websites.Test.csproj
+++ b/src/ResourceManager/Websites/Commands.Websites.Test/Commands.Websites.Test.csproj
@@ -47,8 +47,8 @@
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll
- False
..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ True
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Commands.Storage.csproj b/src/ServiceManagement/Storage/Commands.Storage/Commands.Storage.csproj
index e2e254a727da..8bf56cd89953 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Commands.Storage.csproj
+++ b/src/ServiceManagement/Storage/Commands.Storage/Commands.Storage.csproj
@@ -57,6 +57,10 @@
False
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
+
+ ..\..\..\packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll
+ True
+
False
..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.7-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
diff --git a/src/ServiceManagement/Storage/Commands.Storage/packages.config b/src/ServiceManagement/Storage/Commands.Storage/packages.config
index 594410e77792..12121d290ef4 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/packages.config
+++ b/src/ServiceManagement/Storage/Commands.Storage/packages.config
@@ -4,6 +4,7 @@
+
@@ -20,4 +21,4 @@
-
+
\ No newline at end of file