I manage many Azure signatures and pretty often use Get-AzureSubscription to list the subscriptions I have access to.
I recently added two-factor authentication to my account. And now I get a strange error for some teams. I can log in using Add-AzureAccount, but when I then try to subscribe to the toi list, I get the error message "Get-AzureSubscription: AADSTS16000: Session is invalid due to expiration or recent password change .
Has anyone else seen this? I would appreciate any ideas on how to get around this.
That's what I'm doing:
PS C:\ > add-azureaccount Id Type Subscriptions Tenants -- ---- ------------- ------- username@domain.com User xxxxxx-yyyyyy xxxxxx-yyyyyy xxxxxx-yyyyyy xxxxxx-yyyyyy xxxxxx-yyyyyy xxxxxx-yyyyyy xxxxxx-yyyyyy xxxxxx-yyyyyy PS C:\ > Set-AzureSubscription -SubscriptionId 'xxxxxx-yyyyyy' PS C:\ > select-AzureSubscription -SubscriptionId 'xxxxxx-yyyyyy' PS C:\ > Get-AzureSubscription -ExtendedDetails Get-AzureSubscription : AADSTS16000: Session is invalid due to expiration or recent password change. Trace ID: 6fcfa2da-7d7a-43ba-8230-a227312b535b Correlation ID: 7206fefd-29fa-4103-ba4f-eb15350a0754 Timestamp: 2015-04-01 17:57:28Z At line:1 char:1 + Get-AzureSubscription -ExtendedDetails + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Get-AzureSubscription], AadAuthenticationFailedException + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.Profile.GetAzureSubscriptionCommand
source share