Skip to content

Commit 299e79a

Browse files
author
Pooneh
committed
Getting the first or default tenant ID of a subscription
1 parent a86383d commit 299e79a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +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.GetProperty(AzureSubscription.Property.Tenants);
153+
psObject.TenantId = subscription.GetPropertyAsArray(AzureSubscription.Property.Tenants).FirstOrDefault();
154154
return psObject;
155155
}
156156

0 commit comments

Comments
 (0)