Get-AzSubscription
The resulting list was only showing me a handful of subscriptions.
Figuring it to be a permissions issue I spent 20 minutes comparing my assigned roles for my user account and tried a few different things. This was fruitless.
I then updated Azure Powershell module to the latest version… also fruitless…
Then my admin brain kicked in and I thought… “Do I need to turn it off and back on again…?” i.e. I wonder if there is something cached somewhere…? A bit of google-fu later and I found this:
Clear-AzContext
Running this logs your powershell session out of everything azure (for the currently logged in user on the system you are working from). I did that, then logged back in and re-ran my commands.
Connect-AzAccount
Get-AzSubscription
Get-AzSubscription
Presto… all subscriptions showed up. Simple fix… but googling around for “Can’t see all my subscriptions in Azure Powershell” turned up absolutely nothing so I figured it is probably something obvious to most folks but all the same, I am documenting it here. Hope this helps!
REFERENCE:
https://docs.microsoft.com/en-us/powershell/module/azurerm.profile/clear-azurermcontext
Spent a lot of time trying to figure out the same issue. Thanks for the solution!
“The resulting list was only showing me a handful of subscriptions.
Figuring it to be a permissions issue I spent 20 minutes comparing my assigned roles for my user account and tried a few different things. This was fruitless.”
I was doing the same thing, then a bit of google later I found this post. Thanks!!!!!
Much appreciated.
So glad this was helpful!