I have many tenant on Azure and I use Powershell to manage them.
I'm connect with my account:
Login-AzureRmConnect
Account SubscriptionName TenantId Environment
------- ---------------- -------- -----------
XXX@XXXX.XXX Microsoft Partner Network XXXXX-XXXX-XXXX-XXXX-XXXX AzureCloud
When I want to change te subscription with SubscriptionID valid i have this answers :
Select-AzureRmSubscription -SubscriptionId "XXXX-XXXX-XXXX-XXXXX-XXXXXX"
Select-AzureRmSubscription : Please provide a valid tenant or a valid subscription.
Au caractère Ligne:1 : 1
+ Select-AzureRmSubscription -SubscriptionId "XXXX-XXXX-XXXX-XXXXX-X ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError : (:) [Set-AzureRmContext], ArgumentException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.SetAzureRMContextCommand
And when I do Get-AzureRmSubscription
:
Get-AzureRmSubscription
AVERTISSEMENT : Unable to acquire token for tenant 'XXXXX-XXXX-XXXX-XXXX-XXXX'
AVERTISSEMENT : Unable to acquire token for tenant 'XXXXX-XXXX-XXXX-XXXX-XXXX'
AVERTISSEMENT : Unable to acquire token for tenant 'XXXXX-XXXX-XXXX-XXXX-XXXX'
AVERTISSEMENT : Unable to acquire token for tenant 'XXXXX-XXXX-XXXX-XXXX-XXXX'
AVERTISSEMENT : Unable to acquire token for tenant 'XXXXX-XXXX-XXXX-XXXX-XXXX'
Name Id TenantId State
---- -- -------- -----
Microsoft Partner Network XXXXX-XXXX-XXXX-XXXX-XXXX XXXXX-XXXX-XXXX-XXXX-XXXX Enabled
Microsoft Azure XXXXX-XXXX-XXXX-XXXX-XXXX XXXXX-XXXX-XXXX-XXXX-XXXX Enabled
XXXX - XXXXXXX XXXXX-XXXX-XXXX-XXXX-XXXX XXXXX-XXXX-XXXX-XXXX-XXXX Enabled
Before it worked, in Azure's Portal no change.
Can You help me ?
Thanks You