Skip to content

Get-AzStorageAccount : Your Azure credentials have not been set up or have expired, please run Connect-AzAccount to set up your Azure credentials. #3645

@justPaulo

Description

@justPaulo

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.

Summary

This error relates 100% with VS Code because the one-liner pwsh statement only generates errors when executed in VS Code. Executing it pwsh prompt or PowerShellISE works just great as expected.

PowerShell Version

Name                           Value                                                                                                                                      
----                           -----                                                                                                                                      
PSVersion                      5.1.18362.1801                                                                                                                             
PSEdition                      Desktop                                                                                                                                    
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                    
BuildVersion                   10.0.18362.1801                                                                                                                            
CLRVersion                     4.0.30319.42000                                                                                                                            
WSManStackVersion              3.0                                                                                                                                        
PSRemotingProtocolVersion      2.3                                                                                                                                        
SerializationVersion           1.1.0.1

Visual Studio Code Version

1.61.2
6cba118ac49a1b88332f312a8f67186f7f3c1643
x64

Extension Version

ms-vscode.powershell@2021.10.1

Steps to Reproduce

Screen.Recording.2021-10-26.at.19.58.40.mp4

Visuals

Screen.Recording.2021-10-26.at.19.58.40.mp4

Logs

1635329024-b39e1c8e-7939-492d-a531-aa7c87b6354c1635329022195.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions