microsoft / vscode-azure-account

Common Azure Login extension for VS Code
https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account
Other
138 stars 130 forks source link

Azure Device Code Login in VS Code causing error - "Cannot read properties of undefined (reading 'userId')" #939

Closed sreejithr closed 1 month ago

sreejithr commented 7 months ago

Does this occur consistently? Yes Repro steps:

  1. Press Ctrl + Shift + P in VS Code.
  2. Pick "Azure: Sign In with Device Code" option.
  3. You will see an error dialog in the bottom right of the screen with this error - Cannot read properties of undefined (reading 'userId').

Action: azure-account.manageAccount Error type: TypeError Error Message: Cannot read properties of undefined (reading 'userId')

Version: 0.11.6 OS: win32 OS Release: 10.0.22631 Product: Visual Studio Code Product Version: 1.87.2 Language: en

Call Stack ``` extension.bundle.js:2:2483498extension.bundle.js:2:2483498 extension.bundle.js:2:2482998extension.bundle.js:2:2482998 b extension.bundle.js:2:2482684 manageAccount extension.bundle.js:2:2483170 extension.bundle.js:2:438046extension.bundle.js:2:438046 extension.bundle.js:2:389407extension.bundle.js:2:389407 extension.bundle.js:2:388225extension.bundle.js:2:388225 b extension.bundle.js:2:387911 callWithTelemetryAndErrorHandling extension.bundle.js:2:389314 extension.bundle.js:2:437764extension.bundle.js:2:437764 extension.bundle.js:2:437300extension.bundle.js:2:437300 b extension.bundle.js:2:436986 extension.bundle.js:2:437575extension.bundle.js:2:437575 l.h extensionHostProcess.js:150:184839 l.$executeContributedCommand extensionHostProcess.js:150:185699 s.S extensionHostProcess.js:147:5519 s.Q extensionHostProcess.js:147:5285 s.M extensionHostProcess.js:147:4375 s.L extensionHostProcess.js:147:3454 w.value extensionHostProcess.js:147:2241 n.y extensionHostProcess.js:80:1902 n.fire extensionHostProcess.js:80:2119 r.fire extensionHostProcess.js:105:14091 w.value extensionHostProcess.js:173:8050 n.y extensionHostProcess.js:80:1902 n.fire extensionHostProcess.js:80:2119 r.fire extensionHostProcess.js:105:14091 MessagePortMain. extensionHostProcess.js:173:6330 ```
alexweininger commented 2 months ago

Which extensions are you trying to use with Azure Account? Most Azure extensions have moved off of Azure Account for authentication, and moved to the built-in VS Code Microsoft authentication provider. The Azure Account extension will be deprecated soon. If you're able, uninstall the Azure Account extension.

If you can, try out the new command you can access from the Azure Resources view: image

AzCode-Bot commented 1 month ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!