Skip to main content
Set up your development environment to use the Microsoft Foundry SDK. You also need Azure CLI for authentication so that your code can access your user credentials. In this article, you install language runtimes, Azure CLI, Azure Developer CLI, the Microsoft Foundry Toolkit for Visual Studio Code extension, and Git.
This article covers general prerequisites only, such as language runtimes, global tools, and VS Code and extension setup.
It doesn’t cover scenario-specific steps like SDK installation or authentication.
When your environment is ready, continue to the quickstart for those instructions.

Prerequisites

The Foundry RBAC roles were recently renamed. Foundry User, Foundry Owner, Foundry Account Owner, and Foundry Project Manager were previously named Azure AI User, Azure AI Owner, Azure AI Account Owner, and Azure AI Project Manager. You might still see the previous names in some places while the rename rolls out. The role IDs and core permissions are unchanged by the rename.
  • Owner (for subscription-level permissions). Owner is necessary for additional role assignments required for other scenarios in Foundry. To ensure you are unblocked for all scenarios in Foundry, Owner is the role assignment required.
  • To use project but not create new resources, you need at least:
    • Foundry User on the projects you use (least-privilege role for development)
    For details on each role’s permissions, see Role-based access control for Microsoft Foundry.

Install your programming language

Install the Azure CLI and sign in

You install the Azure CLI and sign in from your local development environment so that your code can use your user credentials to call Azure services through Foundry. In most cases you can install Azure CLI from your terminal using the following command:
    winget install -e --id Microsoft.AzureCLI
You can follow instructions How to install the Azure CLI if these commands don’t work for your particular operating system or setup. After you install the Azure CLI, sign in using the az login command and sign-in using the browser:
az login
Alternatively, you can sign in manually via the browser with a device code.
az login --use-device-code
Keep this terminal open to run scripts after signing in.

Install the Azure Developer CLI

The Azure Developer CLI (azd) is an open-source tool that helps you set up and deploy app resources on Azure. It provides simple commands for key stages of development, whether you use a terminal, IDE, or CI/CD pipelines. Install the Azure Developer CLI for your platform. Many of the AI solution templates include a deployment option using azd.

Install the Microsoft Foundry Toolkit for Visual Studio Code extension

The Foundry Toolkit lets you deploy models, build AI apps, and work with Agents directly from the VS Code interface. Follow the detailed instructions to install and setup the Foundry Toolkit.

Install Git

Git is required to clone Foundry SDK samples. If you don’t have Git installed, follow the instructions for your platform and select your operating system.

Troubleshooting

IssueResolution
Command not found after installClose and reopen your terminal, or restart VS Code, so PATH changes take effect.
az login fails with a browser errorRun az login --use-device-code to authenticate using a device code flow instead.
Python not foundUse python3 instead of python on macOS/Linux, or install a supported version (3.9 or later).
Permission denied during installOn macOS/Linux, avoid sudo pip install. Use a virtual environment instead.

Use the Microsoft Foundry Skill in coding agents