Skip to content

Commit 6731e94

Browse files
author
Hovsep
committed
Merge pull request #19 from pomortaz/dev
Adding tenant ID to the output properties of Get-AzureSubscription cmdlet
2 parents 79990d6 + 299e79a commit 6731e94

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/Common/Commands.Profile/Models/PsAzureSubscription.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@ public class PSAzureSubscription
2727
public bool IsDefault { get; set; }
2828
public bool IsCurrent { get; set; }
2929
public string CurrentStorageAccountName { get; set; }
30+
public string TenantId { get; set; }
3031
}
3132
}

src/Common/Commands.Profile/Subscription/GetAzureSubscription.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ private PSAzureSubscription ConstructPsAzureSubscription(AzureSubscription subsc
150150
psObject.IsDefault = subscription.IsPropertySet(AzureSubscription.Property.Default);
151151
psObject.IsCurrent = AzureSession.CurrentContext.Subscription != null && AzureSession.CurrentContext.Subscription.Id == subscription.Id;
152152
psObject.CurrentStorageAccountName = subscription.GetProperty(AzureSubscription.Property.StorageAccount);
153+
psObject.TenantId = subscription.GetPropertyAsArray(AzureSubscription.Property.Tenants).FirstOrDefault();
153154
return psObject;
154155
}
155156

0 commit comments

Comments
 (0)