I had a similar problem when I try to get endpoints for a virtual machine using:
Get-AzureVM โServiceName "XXX" โName "XXX" | Get-AzureEndpoint
Setting the default subscription record to get VM solved it:
Set-AzureSubscription -DefaultSubscription XXX
Maybe this will help too.
source share