Your Azure credentials have not been set up or have expired

You may run into error message when trying to access Azure via PowerShell command line such as Get-AzureReservedIP. Error message may say "Your Azure credentials have not been set up or have expired" which indicates that Azure Subscription is not properly authenticated. In our situation, we were trying to use Subscription name that is assigned to other user. You need to make sure that Azure Subscription and User account are properly set.  

You need to change user subscription that belongs to the user or change user that can access subscription. We resolved this error by switching user account via Add-AzureAccount command to a user that had access to our subscription.

Detailed Error Message is shown below.

Get-AzureReservedIP : Your Azure credentials have not been set up or have expired, please run Add-AzureAccount to set
up your Azure credentials.
At line:1 char:1
+ Get-AzureReservedIP
+ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-AzureReservedIP], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.GetAzure

Featured pages

Services

Windows Azure has several services available for use when you first sign up with Azure. Some of the…

PowerShell

Azure PowerShell scripts are integral part of Microsoft Azure environment. It is designed to help A…

Errors

Azure Cloud Services are very information when it comes to producing error messages. Some of the co…

Pricing

Windows Azure has difference services and pricing normally calculated via Online Azure Pricing Calc…