Skip to main content

Getting Started with Microsoft Foundry models in VS Code

Microsoft Foundry is quickly becoming the engineering‑grade backbone for building, deploying, and operationalizing AI systems at scale. Unlike traditional “chatbot builders” or UI‑only agent platforms, Foundry is designed for real developers — people who care about versioning, reproducibility, security boundaries, and clean architecture.

At its core, Foundry gives you a unified place to define models, agents, tools, workflows, and evaluations, all backed by Azure’s enterprise‑grade infrastructure. But the real power shows up when you bring Foundry into Visual Studio Code, where everything becomes code‑first, scriptable, automatable, and production‑ready.

In this blog, we’ll walk through the setup steps to connect and use your Microsoft Foundry LLm models in VS Code. 

Prerequistes:

Step 1: Install Required VS Code extensions
Install these extension on your VS Code:
  • Azure Resources
  • AI Toolkit for Visual Studio Code
  • Microsoft Foundry

Step 2: Sign in to Azure from VS Code
  1. Open the Azure resources extension in VS Code, and Sign in to Azure. 
  2. Sign in using your Microsoft account (same account used for Project creation and Model deployment in Microsoft Foundry). Complete multi-factor authentication if required.
  3. Choose Sign in for this app only (recommended)
  4. Set the Default Microsoft Foundry Project.
  5. VS Code should now be connected to your Azure account.
  6. Click on the Microsoft Foundry dropdown, and verify that you can see your Foundry project(s).
  7. Right Click on a project, and select Open in Foundry Toolkit Extension (a.k.a AI Toolkit)
  8. In the A.I Toolkit, Expand My Resources > {yourproject} > Models section. Verify that you can see the models that you deployed on your Foundry project.
    Note: It can take a few minutes for the models to load. 
Step 3: Add your models to GitHub Copilot
  1. Open the GitHub copilot chat window, and click on the Pick model button.
  2. Next, click on the settings cogwheel.
  3. On the 'Language models' window, Expand the Microsoft Foundry via AI Toolkit section, and search for your model name.

  4. Right click on the name of model that you deployed on , click on Pin model.
  5. Close the 'Language models' window.
  6. Click on the Pick modelU button again, and select the model that you pinned earlier from the 'Language models' window.
  7. You should now be able to chat and interact with you Microsoft Foundry model directly from the GitHub Copilot chat window in your VS Code.
With everything now connected, your setup elevates Foundry from a portal‑only experience to a true developer‑first workflow, letting you build, test, refine, and iterate entirely inside your editor.
From here, you’re ready to start exploring agent interactions, trigger workflows, and gradually move toward a fully code‑driven AI development process. This foundation sets you up for everything that comes next in your Foundry journey.

Comments

Popular posts from this blog

User Security Governance (Preview) feature in D365 FO

Let's take a first look at User security governance . It is the latest set of features in the D365F&O 10.0.43 update which provides useful tools to System administrators for role management, licenses auditing, enhanced audit trails and versioning, supported with some useful very useful reports around license usage, separation of duties violations etc. Key aspects of this feature include: Role Management: Improved tools for creating, modifying, and managing user roles. Audit Trails: Enhanced tracking of changes made to security settings, helping administrators monitor and review security configurations. Compliance: Tools to ensure that security settings comply with organizational policies and regulatory requirements. Feature management A new feature called (Preview) User security governance has been added to Feature management to control the overall functionality. Navigate to System administration > Security > Security governance to explore all the features. Security analy...

Microsoft Dynamics 365 FSCM Licensing - New Multi-License Mapping on Menu Items

Licensing in enterprise systems has long been a game of mapping menu items to license types, ticking boxes, and hoping your role design didn’t trigger unexpected costs. But with the 2025 updates to Dynamics 365 Finance and Operations, Microsoft has flipped the script—ushering in a smarter, more flexible model that reflects how users actually work. Let’s break it down. In the legacy model, each menu item was tied to a single license type. For instance, if a user accessed MenuItemA that had a Finance license type on it, they needed a Finance license. If they accessed MenuItemB with SCM assigned on it, they needed SCM. Simple? Yes. But also rigid, prone to over-licensing, and blind to real-world role overlap. Example:  This model treated licensing like a static blueprint—ignoring the nuance of blended roles, attach licenses, and shared responsibilities across departments. Fast forward to 2025. Microsoft’s new licensing logic is object-level, dynamic, and context-aware. Now, a single m...

Conditionally Hiding Menu Items in D365 FinOps Menus Without Using Feature Keys

In Microsoft Dynamics 365 Finance and Operations (D365 F&O), menu items are the links that can be clicked on to access forms, reports, classes, jobs, and queries. Feature keys are typically used to control the visibility of menu items based on user licenses. However, there are scenarios where you might want to hide menu items conditionally without relying on feature keys.  This can be accomplished by extending the 'SysMenuNavigationObjectFactory' class and modifying the checkAddSubMenu(...) method.  Suppose we want to hide the  Vendor payment journal menu item under Accounts payable > Payments > Vendor payment journal Steps 1. Create an extension of the SysMenuNavigationObjectFactory class [ ExtensionOf ( classStr (SysMenuNavigationObjectFactory))] internal final class SysMenuNavigationObjectFactory_PS_Extension { } 2. Create a Chain of Command (CoC) for the checkAddSubMenu method [ ExtensionOf ( classStr (SysMenuNavigationObjectFactory))] internal final...