Skip to main content

Create a project for Microsoft Foundry

This article refers to the Microsoft Foundry (new) portal.
This article describes how to create a Foundry project in Microsoft Foundry. Projects let you organize your work—such as agents, evaluations, and files—as you build stateful apps and explore new ideas. If your organization requires customized Azure configurations like alternative names, security controls, or cost tags, you might need to use the Azure portal or template options to comply with your organization’s Azure Policy requirements.

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.
  • Access to a role that allows you to create a Foundry resource, such as Azure Account AI Owner or Azure AI Owner on the subscription or resource group. For more information about permissions, see Role-based access control for Microsoft Foundry.
  • Use the following tabs to select the method you want to use to create a Foundry project:

    Foundry portal

    Python SDK

    • Set up your development environment
    • Run az login or az login --use-device-code in your environment before running code.
    • Quick validation: Before creating a project, verify your SDK and authentication are working by testing the client:
      from azure.identity import DefaultAzureCredential
      from azure.mgmt.cognitiveservices import CognitiveServicesManagementClient
      
      # Test authentication by instantiating the client
      credential = DefaultAzureCredential()
      subscription_id = "<your-subscription-id>"  # Replace with your subscription ID
      client = CognitiveServicesManagementClient(credential, subscription_id)
      print("✓ Authentication successful! Ready to create a project.")
      
      • Complete these steps to start your Python script:
      1. Install packages: pip install azure-identity azure-mgmt-cognitiveservices~=13.7.0b1. If you’re in a notebook cell, use %pip install instead.
      2. Use pip show azure-mgmt-cognitiveservices to check that your version is 13.7 or greater.
      3. Start your script with the following code to create the client connection and variables used throughout this article. This example creates the project in East US:
        # source: https://github.com/Azure/agent-first-sdk/blob/main/tests/management_sdk/manage_ai_foundry.ipynb
        
        # <create_client>
        from azure.identity import DefaultAzureCredential
        from azure.mgmt.cognitiveservices import CognitiveServicesManagementClient
        
        subscription_id = 'your-subscription-id'
        resource_group_name = 'your-resource-group-name'
        foundry_resource_name = 'your-foundry-resource-name'
        foundry_project_name = 'your-foundry-project-name'
        location = 'eastus'
        
        client = CognitiveServicesManagementClient(
            credential=DefaultAzureCredential(), 
            subscription_id=subscription_id,
            api_version="2025-04-01-preview"
        )
        # </create_client>
        # TODO: add code to create create a new resource group
        
        # <create_resource_project>
        # Create resource
        resource = client.accounts.begin_create(
            resource_group_name=resource_group_name,
            account_name=foundry_resource_name,
            account={
                "location": location,
                "kind": "AIServices",
                "sku": {"name": "S0",},
                "identity": {"type": "SystemAssigned"},
                "properties": {
                    "allowProjectManagement": True,
                    "customSubDomainName": foundry_resource_name
                }
            }
        )
        
        # Wait for the resource creation to complete
        resource_result = resource.result()
        
        # Create default project
        project = client.projects.begin_create(
            resource_group_name=resource_group_name,
            account_name=foundry_resource_name,
            project_name=foundry_project_name,
            project={
                "location": location,
                "identity": {
                    "type": "SystemAssigned"
                },
                "properties": {}
            }
        )
        # </create_resource_project>
        # TODO: code to do role assignment to give user project manager role on the account
        
        # <create_additional>
        # Create additional project
        new_project_name = 'your-new-project-name'
        
        project = client.projects.begin_create(
            resource_group_name=resource_group_name,
            account_name=foundry_resource_name,
            project_name=new_project_name,
            project={
                "location": location,
                "identity": {
                    "type": "SystemAssigned"
                },
                "properties": {}
            }
        )
        # </create_additional>
        # <show_project>
        # Get project
        project = client.projects.get(
            resource_group_name=resource_group_name,
            account_name=foundry_resource_name,
            project_name=foundry_project_name
        )
        print(project)
        # </show_project>
        
      4. (Optional) If you have multiple accounts, add the tenant ID of the Microsoft Entra ID you want to use into the DefaultAzureCredential.
        DefaultAzureCredential(interactive_browser_tenant_id="<TENANT_ID>")
        

    Azure CLI

    • Install the Azure CLI.
    • Set default values for subscription.
        # Set your default subscription
        az account set --subscription "{subscription-name}"
      

Create a Foundry project

Sign in to Microsoft Foundry. Make sure the New Foundry toggle is on. These steps refer to Foundry (new).
  1. What you do next depends on where you are:
  • If you don’t have any existing projects: Follow the steps in Quickstart: Get started with Microsoft Foundry to create your first project.
  • If you’re in a project: Select the project breadcrumb, then select Create new resource.
Screenshot shows creating a new project from a breadcrumb.
  • If you’re not in a project: Select Create new in the top right to create a new Foundry project
Screenshot shows how to create a new project in Foundry.
  1. Select Foundry resource, and then select Next.
  2. Provide a name for your project and select Create. Or see the next section for advanced options.
::: moniker-endThese steps provide a way to create a new Azure resource with basic, defaulted, settings.To create a Foundry project, follow these steps:
::: moniker range=“foundry” Sign in to Microsoft Foundry. Make sure the New Foundry toggle is on. These steps refer to Foundry (new).
  1. The project you’re working on appears in the upper-left corner.
  2. To create a new project, select the project name, and then select Create new project.
  3. Give your project a name and select Create project. Or see next section for advanced options.
::: moniker-end

Advanced options

  1. You create a Foundry project on a Foundry resource. The portal automatically creates this resource when you create the project. Select an existing Resource group to use, or leave the default to create a new resource group.
Especially for getting started, create a new resource group for your project. The resource group makes it easy to manage the project and all its resources together.
  1. Select a Location or use the default. The location is the region where the project resources are hosted.
  2. Select Create. You see the progress of resource creation. The project is created when the process is complete.

Create multiple projects on the same resource

Create multiple Foundry projects on an existing Foundry resource to enable team collaboration and shared resource access including security, deployments, and connected tools. This setup is ideal in restricted Azure subscriptions where developers need self-serve exploration ability within the setup of a preconfigured environment.
Diagram shows how a team could share resource access with multiple projects on a Foundry resource.
Foundry projects as Azure child resources may get assigned their own access controls, but share common settings such as network security, deployments, and Azure tool integration from their parent resource. While not all Foundry capabilities support organizing work in projects yet, your resource’s first “default” project is more powerful. You can identify it by the tag “default” in UX experiences and the resource property “is_default” when using code options.
FeatureDefault projectOther projects
Model inference
Playgrounds
Agents
Evaluations
Tracing
Datasets
Indexes
Foundry SDK and API
Content understanding
OpenAI SDK and APIResponses, Files, Conversations
OpenAI Batch, Fine-tuning, Stored completions-
Language fine-tuning
Speech fine-tuning-
Connections
Sign in to Microsoft Foundry. Make sure the New Foundry toggle is on. These steps refer to Foundry (new).
  1. Select either the Foundry project or its associated resource.
  2. In the left pane, select Management center.
  3. In the resource section, select Overview.
  4. Select New project and provide a name.
Screenshot shows how to create a second project on an existing resource.
::: moniker-end The Foundry (new) portal displays only the default project for each Foundry resource. You can’t create multiple projects, or view any of the nondefault projects in the Foundry (new) portal.

Python SDK

While this code can add additional projects to a resource, you won’t be able to view them in the Foundry (new) portal. Only the default project for a resource is available in the Foundry (new) portal. Add this code to your script to create a new project on your existing resource:
# source: https://github.com/Azure/agent-first-sdk/blob/main/tests/management_sdk/manage_ai_foundry.ipynb

# <create_client>
from azure.identity import DefaultAzureCredential
from azure.mgmt.cognitiveservices import CognitiveServicesManagementClient

subscription_id = 'your-subscription-id'
resource_group_name = 'your-resource-group-name'
foundry_resource_name = 'your-foundry-resource-name'
foundry_project_name = 'your-foundry-project-name'
location = 'eastus'

client = CognitiveServicesManagementClient(
    credential=DefaultAzureCredential(), 
    subscription_id=subscription_id,
    api_version="2025-04-01-preview"
)
# </create_client>
# TODO: add code to create create a new resource group

# <create_resource_project>
# Create resource
resource = client.accounts.begin_create(
    resource_group_name=resource_group_name,
    account_name=foundry_resource_name,
    account={
        "location": location,
        "kind": "AIServices",
        "sku": {"name": "S0",},
        "identity": {"type": "SystemAssigned"},
        "properties": {
            "allowProjectManagement": True,
            "customSubDomainName": foundry_resource_name
        }
    }
)

# Wait for the resource creation to complete
resource_result = resource.result()

# Create default project
project = client.projects.begin_create(
    resource_group_name=resource_group_name,
    account_name=foundry_resource_name,
    project_name=foundry_project_name,
    project={
        "location": location,
        "identity": {
            "type": "SystemAssigned"
        },
        "properties": {}
    }
)
# </create_resource_project>
# TODO: code to do role assignment to give user project manager role on the account

# <create_additional>
# Create additional project
new_project_name = 'your-new-project-name'

project = client.projects.begin_create(
    resource_group_name=resource_group_name,
    account_name=foundry_resource_name,
    project_name=new_project_name,
    project={
        "location": location,
        "identity": {
            "type": "SystemAssigned"
        },
        "properties": {}
    }
)
# </create_additional>
# <show_project>
# Get project
project = client.projects.get(
    resource_group_name=resource_group_name,
    account_name=foundry_resource_name,
    project_name=foundry_project_name
)
print(project)
# </show_project>

Azure CLI

While this code can add additional projects to a resource, you won’t be able to view them in the Foundry (new) portal. Only the default project for a resource is available in the Foundry (new) portal. To add a new project to my-foundry-resource:
 az cognitiveservices account project create \
 --name my-foundry-resource \
 --project-name {new_project_name} \
 --location eastus

  • If you delete your Foundry resource’s default project, the next project created will become the default project.

View project settings

On the Home project page, you see the project endpoint and API key for the project. You don’t need the API key if you use Microsoft Entra ID authentication.

Delete projects

Sign in to Microsoft Foundry. Make sure the New Foundry toggle is on. These steps refer to Foundry (new).
  1. Open your project.
  2. Select Management center.
  3. Under Resource, select Overview.
  4. Select any projects you no longer want to keep.
  5. Select Delete project.
To delete the Foundry resource and all its projects:
  1. In the Management center, select the resource name from the Overview section to go to the Azure portal.
  2. In the Azure portal, select Delete to delete the resource and all its associated projects.
::: moniker-end
::: moniker range=“foundry” Sign in to Microsoft Foundry. Make sure the New Foundry toggle is on. These steps refer to Foundry (new).
  1. In the upper-right navigation, select Operate.
  2. In the left pane, select Admin.
  3. Select your project.
  4. In the upper right, select the trash can icon to delete the project.
::: moniker-end
Use with caution. You can’t recover a project after it’s deleted.