azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

Allow modifying port for interactive login: `az login ... --port 1234`

Open megakoresh opened this issue 3 years ago • 3 comments

Related command

az login

Is your feature request related to a problem? Please describe.

When you use VSCode remote development extension, it is not able to detect Azure CLI port and automatically forward it when az login is used with interactive login (even though it's able to intercept the xdg calls and open the browser tab to login). This means I have to manully copy the callback port and forward it every time I have to login which is a pain when you have many accounts.

Describe the solution you'd like

To solve this there could be a configuration option which would let us set a static port and we could then pre-forward it in the VSCode settings. GG EZ.

Describe alternatives you've considered

Well, I could open a feature request to VSCode to actually detect the dynamic port from the az cli commands, but I think this solution is much simpler and easier to implement.

Additional context

N/A

megakoresh avatar Nov 11 '22 08:11 megakoresh

@jiasli for awareness

yonzhan avatar Nov 11 '22 08:11 yonzhan

Can be fixed by https://github.com/Azure/azure-cli/issues/26556#issuecomment-1917943977.

ffMathy avatar Feb 13 '24 12:02 ffMathy

The "solution" linked in https://github.com/Azure/azure-cli/issues/24626#issuecomment-1941415849 is VSCode specific, if this kwarg is supported it would be a more general solution

thesofakillers avatar Oct 16 '24 13:10 thesofakillers

Can be fixed by #26556 (comment).

I tried in VSCode and it didn't work for me

cdenneen avatar Oct 24 '25 00:10 cdenneen