Microsoft Foundry Toolkit in VS Code does not recognize my Azure account

Mykhailo Stashkiv 0 Reputation points
2026-09-05T23:25:49.1033333+00:00

I am having an authentication issue with the Microsoft Foundry Toolkit in Visual Studio Code.

VS Code Azure Resources correctly recognizes my Azure work account and subscription, but Microsoft Foundry Toolkit does not consistently recognize the same Azure authentication session.

My environment:

  • Windows
  • Visual Studio Code
  • Microsoft Foundry Toolkit 1.6.11
  • Work account: mykhai***********tware.onmicrosoft.com
  • Tenant: Stashkiv Software LLC
  • Subscription: Azure subscription Business

Azure authentication itself appears to be working correctly:

  • az login succeeds.
  • az account show works.
  • Azure Resources extension in VS Code displays my subscription.
  • The correct work account and tenant appear under Accounts & Tenants.

However, when using Microsoft Foundry Toolkit, I intermittently receive:

“You are not signed in to an Azure account. Please sign in.”

In some cases authentication works, and in other cases it fails, even though Azure Resources remains authenticated.

I have already tried:

  • Signing out and signing back into Azure in VS Code
  • Reloading VS Code
  • Refreshing Azure Resources
  • Selecting the correct tenant/subscription
  • Authenticating again with az login

Is there a separate authentication context or cached tenant/session used by Microsoft Foundry Toolkit?

How can I completely reset the Foundry Toolkit authentication state and make it consistently use the Azure account/tenant already selected by Azure Resources?

Foundry Tools
Foundry Tools

Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform


1 answer

Sort by: Oldest
  1. Ganesh Gurram 7,570 Reputation points Microsoft External Staff Moderator
    2026-09-07T10:37:08.52+00:00

    @Mykhailo Stashkiv - Thank you for posting your query in MS Q&A forum.

    Based on the Microsoft Foundry Toolkit documentation, Foundry Toolkit uses the Azure account, tenant, and subscription context available through the Azure Resources experience in VS Code. Therefore, if Azure Resources is signed in and can enumerate your subscriptions, Foundry Toolkit should be able to use the same account context.

    Since the issue is intermittent, the behavior does not appear to be an Azure CLI authentication problem. While az login and az account show confirm that your Azure CLI credentials are working, Foundry Toolkit relies on the VS Code Azure sign-in experience and project selection within the toolkit.

    To refresh the Foundry Toolkit context, please try the following:

    1. Verify the VS Code account - Open Accounts in VS Code and confirm that mykhailo@*******vsoftware.onmicrosoft.com is signed in and does not require re-authentication. Ensure the correct tenant (Stashkiv Software LLC) is selected under Azure > Accounts & Tenants. [VSCode fai...rosoft Q&A | Learn.Microsoft.com]
    2. Confirm Azure Resources can see the subscription - Open Azure Resources. Verify that Azure subscription Business is visible under Resources and can be expanded successfully.
    3. Re-select the Foundry project - Open Foundry Toolkit. Navigate to My Resources → Set Foundry Project. Select Switch Project and choose the appropriate subscription and Foundry project again. Confirm the project resources load correctly.
    4. Clear and reconfigure the default project - If you have a previously configured default project, clear it and then select the Foundry project again. The documentation indicates that the default project remains configured until it is changed, cleared, you sign out, or access is removed.
    5. Try device-code authentication - Open the Command Palette (Ctrl+Shift+P). Run Azure: Sign in with device code. Several users with similar VS Code Azure authentication issues reported that this resolved inconsistent sign-in behavior. [Visual Stu...rosoft Q&A | Learn.Microsoft.com]

    I Hope this helps. Do let me know if you have any further queries.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.