terminal icon indicating copy to clipboard operation
terminal copied to clipboard

[Bug] Azure exits with exit code 1 after authentication

Open youzi-2333 opened this issue 2 years ago • 1 comments

Windows Terminal version

1.15.3466.0

Windows build number

10.0.22621.963

Other Software

No response

Steps to reproduce

  1. Open the Terminal ;
  2. Open a new tab (Azure Cloud Shell) ;
  3. Use the login code to login at https://microsoft.com/devicelogin ;
  4. The Terminal outputs that I have been authenticated and Azure exits suddenly with exit code 1 .

This is the output in Chinese below (Can't upload screenshots) :

若要登录,请使用 Web 浏览器打开页 https://microsoft.com/devicelogin,然后输入代码 I7[Private]8 进行身份验证。
此代码将在 15 分钟后过期。
已经过身份验证。

[已退出进程,代码为 1 (0x00000001)]

Expected Behavior

No response

Actual Behavior

Azure exits suddenly with exit code 1(0x00000001).

youzi-2333 avatar Jan 06 '23 00:01 youzi-2333

Btw, I also tried to run Terminal as Administrator, and it isn't fixed.

youzi-2333 avatar Jan 06 '23 00:01 youzi-2333

Since you authenticated but didn't get a prompt to select a tenant, it seems that either

  • the process is exiting while attempting to populate your list of tenants
  • OR you only have 1 tenant, and the process is exiting after getting that tenant but before you get the prompt asking you if you would like to store your credentials (this feels unlikely as there isn't much going on here)

Are you able to use the Azure Cloud Shell directly in your browser via this link https://shell.azure.com/ ?

PankajBhojwani avatar Jan 13 '23 12:01 PankajBhojwani

Hi, I have just noticed that I didn't have Azure account yet. Maybe this would cause the problem? The link reminds me that I have not signed up and paid for it.

youzi-2333 avatar Jan 13 '23 13:01 youzi-2333

I have just noticed that I didn't have Azure account yet. Maybe this would cause the problem?

Very possibly! Once you are able to use the Azure Cloud Shell in your browser (via that link), try again in Terminal and see if it works

PankajBhojwani avatar Jan 13 '23 16:01 PankajBhojwani

It works with a valid az shell account:

az_profile_test

elsaco avatar Jan 13 '23 16:01 elsaco

Perfect! Closing this out then

PankajBhojwani avatar Jan 13 '23 16:01 PankajBhojwani