Your Azure credentials have not been set up or have expired, please run Connect-AzAccount to set up your Azure credentials

For some reason I run into an issue today when I was creating this blogpost where after signing in with PowerShell to Azure with Connect-AzAccount I was unable to run any other commands. I have tried all different kind of possible solution, from clearing cache, temp folders, reboot, installing updates etc. but none of these was the solution to this.
After a while of troubleshooting I remembered that with AzureRm I did have this issue aswell. Clearing the Azure Profile was the solution for this. For Az there is still such a command, ‘Clear-AzContext’.



Run the Clear-AzContext Commandlet and then try Connect-AzAccount to get the valid bearer token to continue.

Have a cloudy day!

About Daniel Etten

I currently work as a Cloud Engineer for InSpark in the Netherlands. Together with Paul I started this blog to share our experiences with Azure to other Azure minded people and as a personal repo of Azure info.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

Leave a Reply

Your email address will not be published. Required fields are marked *