Rediger

Quickstart: Set up Microsoft Foundry resources

In this quickstart, you create a Microsoft Foundry project and deploy a model. If you're managing a team, you also grant access to team members. After you complete these steps, you or your team can start building AI applications using the deployed model.

Tip

This quickstart shows you how to create resources to build an agent with a basic setup. For more advanced scenarios that use your own resources, see Set up your environment for agent development.

Prerequisites

  • An Azure account with an active subscription. If you don't have one, create a free Azure account, which includes a free trial subscription.
  • If you're creating the project for yourself:
    • Access to a role that allows you to create a Foundry resource, such as Azure Account AI Owner or Foundry Owner on the subscription or resource group. For more information about permissions, see Role-based access control for Microsoft Foundry.

      Important

      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.

  • If you're creating the project for a team:
    • Access to a role that allows you to complete role assignments, such as Owner. For more information about permissions, see Role-based access control for Microsoft Foundry.
    • A list of user email addresses or Microsoft Entra security group IDs for team members who need access.

Select your preferred method by using the following tabs:

  • Install the Azure CLI version 2.67.0 or later (check with az version).

  • Sign in to Azure:

    az login
    

Create a project

Create a Foundry project to organize your work. The project contains models, agents, and other resources your team uses.

  1. Create a resource group or use an existing one. For example, create my-foundry-rg in eastus:

    az group create --name my-foundry-rg --location eastus
    
  2. Create the Foundry resource. For example, create my-foundry-resource in the my-foundry-rg resource group:

    az cognitiveservices account create \
        --name my-foundry-resource \
        --resource-group my-foundry-rg \
        --kind AIServices \
        --sku s0 \
        --location eastus \
       --allow-project-management
    

    The --allow-project-management flag enables project creation within this resource.

  3. Create a custom subdomain for the resource. The custom domain name must be globally unique. If my-foundry-resource is taken, try a more unique name.

    az cognitiveservices account update \
        --name my-foundry-resource \
        --resource-group my-foundry-rg \
        --custom-domain my-foundry-resource
    
  4. Create the project. For example, create my-foundry-project in the my-foundry-resource:

    az cognitiveservices account project create \
        --name my-foundry-resource \
        --resource-group my-foundry-rg \
        --project-name my-foundry-project \
        --location eastus
    
  5. Verify the project was created:

    az cognitiveservices account project show \
        --name my-foundry-resource \
        --resource-group my-foundry-rg \
        --project-name my-foundry-project
    

    The output displays the project properties, including its resource ID.

Reference: az cognitiveservices account

Deploy a model

Deploy a model that you can use. This example uses gpt-4.1-mini, but you can choose any available model.

az cognitiveservices account deployment create \
    --name my-foundry-resource \
    --resource-group my-foundry-rg \
    --deployment-name gpt-4.1-mini \
    --model-name gpt-4.1-mini \
    --model-version "2025-04-14" \
    --model-format OpenAI \
    --sku-capacity 10 \
    --sku-name Standard

Verify the deployment succeeded:

az cognitiveservices account deployment show \
    --name my-foundry-resource \
    --resource-group my-foundry-rg \
    --deployment-name gpt-4.1-mini

When the deployment is ready, the output shows "provisioningState": "Succeeded".

Reference: az cognitiveservices account deployment

Get your project connection details

You need your project endpoint to connect from code. If you're administering this project for others, send them this endpoint along with the deployment name.

  1. Sign in to Microsoft Foundry by using your Azure account.
  2. Select your project.
  3. Find your project endpoint on the welcome screen of the project. Screenshot of Microsoft Foundry Models welcome screen showing the endpoint URL and copy button.
  4. Copy the endpoint value. You use this value in other quickstarts and tutorials.

For administrators - grant access

If you're administering a team, assign the Foundry User role to team members so they can use the project and deployed models. This role provides the minimum permissions needed to build and test AI applications. For other roles you might need to assign, see Role-based access control for Microsoft Foundry

Important

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.

  1. Get the project's resource ID:

    PROJECT_ID=$(az cognitiveservices account project show \
      --name my-foundry-resource \
      --resource-group my-foundry-rg \
      --project-name my-foundry-project \
      --query id -o tsv)
    
  2. Assign the Foundry User role to a team member:

    Important

    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.

    az role assignment create \
        --role "Foundry User" \
        --assignee "user@contoso.com" \
        --scope $PROJECT_ID
    

Note

If the new role name doesn't work yet, use the previous name instead: Azure AI User, Azure AI Owner, Azure AI Account Owner, or Azure AI Project Manager.

To add a security group instead of an individual user:

az role assignment create \
    --role "Foundry User" \
    --assignee-object-id "<security-group-object-id>" \
    --assignee-principal-type Group \
    --scope $PROJECT_ID
  1. Verify the role assignment:

    az role assignment list \
        --scope $PROJECT_ID \
        --role "Foundry User" \
        --output table
    

Reference: az role assignment

Verify team member access

Ask a team member to verify their access by signing in to Microsoft Foundry and selecting the project from the project list.

If the team member can't access the project, verify that the role assignment completed successfully. Check that you used the correct email address or security group ID. Make sure the team member's Azure account is in the same Microsoft Entra tenant.

To confirm the deployed model is available, ask the team member to select Build in the upper-right navigation, then Models in the left pane.

Clean up resources

When you no longer want this project, delete the resource group to delete all resources associated with it.

az group delete --name my-foundry-rg --yes --no-wait

Next step