private AzureAccount GetSubscriptionAccount(Guid subscriptionId)
{
List<AzureAccount> accounts = ListSubscriptionAccounts(subscriptionId);
AzureAccount account = accounts.FirstOrDefault(a => a.Type != AzureAccount.AccountType.Certificate);
if (account != null)
{
// Found a non-certificate account.
return account;
}
// Use certificate account if its there.
account = accounts.FirstOrDefault();
return account;
}