microsoft / vscode-azureappservice

Azure App Service extension for VS Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azureappservice
MIT License
111 stars 94 forks source link

Failed to create a web app with an error "The JWT token does not contain expected audience uri 'https://management.core.windows.net/'." #2616

Closed Amar-QA closed 6 months ago

Amar-QA commented 7 months ago

OS: All App Service Build Version: 20240204.1 Regression: Previous Build 20240129.1

Repro Steps:

  1. Right-Click the App Services -> Select Create New Web App -> Enter name for the Web App -> Select a Runtime -> Select a pricing tier.
  2. Check whether succeeds to create a web app or not.

Expect: Succeed to create a web app.

Actual: Failed to create a web app with an error "The JWT token does not contain expected audience uri 'https://management.core.windows.net/'."

Picture1

More Info:

  1. Fail to retrieve the latest runtimes when creating a web app

    image
  2. This issue does not reproduce on the previous build 20240129.1.

nturinski commented 7 months ago

This is due to an auth package upgrade. A proposed solution is to maintain our original getToken function that seems to work for basically everything except anything that needs custom scopes. For those calls, we would use getTokenWithScopes that would unblock work in Databases.

Temporarily, we can revert the changes by upgrading appservice to v2.3.6.