Get-AzStorageAccount: Your Azure Credentials Have Not Been Set Up or Have Expire...
source link: https://www.irisclasson.com/2021/01/20/get-azstorageaccount-your-azure-credentials-have-not-been-set-up-or-have-expired/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Get-AzStorageAccount Your Azure credentials have not been set up or have expired
A quick blog post today regarding dealing with Azure credentials issues as I keep getting this error in my scripts from time to time.
Get-AzStorageAccount : Your Azure credentials have not been set up or have expired
If you get this error even though you have logged in either by direct input or by passing in the credentials object it could be because you have several active sessions. Use the Clear-AzContext Cmdlt to clear the context, with the scope set to either Process or CurrentUser. There is also an option to pass in DefaultProfile which is the same as the AzContext, if you want to clear the credentials for a specific profile.
For some scripts or sessions you might want to disable autosave by using Disable-AzContextAutosave if you are only using the result locally and temporarily. The Cmdlet has similar params as the previous Cmdlet.
Comments
Leave a comment (via email)Last modified on 2021-01-20
No newer posts. Previous
Happy New Year! Book Giveaway Migrating to ASP.NET Core
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK