microsoft / vscode-azure-account

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

AADSTS70020: The provided value for the input parameter 'device_code' is not valid. This device code has expired. #987

Open Marika-Zimante opened 4 months ago

Marika-Zimante commented 4 months ago

AADSTS70020: The provided value for the input parameter 'device_code' is not valid. This device code has expired. Trace ID: 59763989-2ff7-4f85-ae47-f0b2d01d8c00 Correlation ID: 77eb9ae8-3365-4b37-99a3-fb1796b09329 Timestamp: 2024-08-01 13:50:57Z

Does this occur consistently? Yes Repro steps:

  1. On trying to download Symbols. Azure error AADSTS70020
  2. If I try to autenticate with Azure directly it is done, but still not able to donload symbold fron Business Central

Version: 0.12.0 OS: win32 OS Release: 10.0.22631 Product: Visual Studio Code Product Version: 1.91.1 Language: en

Marika-Zimante commented 4 months ago

[2024-08-01 16:02:34.46] Acquiring token for authority https://login.microsoftonline.com/d782919f-d1c7-493d-ba7d-07bf747d1505 using correlation 3eca6652-8e5e-47cb-8419-9dcbaa7f4bcd. after i get error on Azure connection

alexweininger commented 3 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

JeremyVyska commented 2 months ago

Probably far too late to be of help to @Marika-Zimante , but I came across this thread from a search.

This is a problem related to the Business Central AL extension inside VSCode, not a Azure auth issue.

What's happening is that the AL Extension is trying to do the "Device Login" flow and pops a Notification for the user to copy the Device Login Code, then authorize the app.

But, if you've hidden that Notification, it appears to just hang, eventually timing out. To resolve this issue, in the Notification 🔔 in the very bottom right corner of VSC, "Turn On" the device login notifications again.

alexweininger commented 2 months ago

@JeremyVyska Hi Jeremy, thanks for the additional info, that's really helpful. I'd like to learn more about the extension. Does it depend on the Azure Account extension? If so, please make sure you read https://github.com/microsoft/vscode-azure-account/issues/964 because Azure Account is being deprecated at the end of 2024!

JeremyVyska commented 2 months ago

Likely it does not, no, as it's from the Microsoft team themselves, but the source code of the extension in question is not public AFAIK, so maybe. I can ask the platform team over at https://github.com/Microsoft/AL

It's the vital tooling component for development for one of the Microsoft Business ecosystem's flagship Cloud offering for Small/Medium Businesses. It allows developers to edit/build/publish AL code. AL code, when put into the Business Central engine, is transpiled into C# for the back end, as well as the syntax for the front-end rendering. All this for an "ERP" system, a lovely combination of things for Accounting, Inventory, Warehousing, and a few more.

For more info, I wrote this as an interesting "on ramp" intro: https://sparebrained.com/2021/05/business-central-the-career-youve-never-heard-of/