Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Note
An alternate Foundry project creation article is available: Create a project for Azure AI Foundry (Foundry projects).
This article describes how to create a hub-based project in Azure AI Foundry. Use a hub project when you need prompt flow, managed compute, Azure Machine Learning compatibility, or advanced development features.
See Types of projects for more information on the different project types.
Prerequisites
Choose a method:
Azure AI Foundry portal
- Azure subscription.
Python SDK
- Azure subscription.
- Azure Machine Learning SDK v2.
- Existing hub resource (see create hub article).
- Azure CLI installed and authenticated (
az login
).
Azure CLI
- Azure subscription.
- Azure CLI with ML extension installed.
- Existing hub resource.
Create a hub project
Azure AI Foundry portal
To create a hub-based project in Azure AI Foundry, follow these steps:
Sign in to Azure AI Foundry.
-
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 Azure AI Foundry to create your first project.
If you're in a project: Select the project breadcrumb, then select Create new resource.
If you're not in a project: Select Create new in the top right to create a new Azure AI Foundry project
Select AI hub resource, then select Next.
Enter a name for the project.
If you have a hub, you'll see the one you most recently used selected.
If you don't have a hub, a default one is created for you.
Select Create.
Or, if you want to customize a new hub, follow the steps in the next section before you select Create.
Customize the hub
A hub-based project exists inside a hub. A hub allows you to share configurations like data connections with all projects, and to centrally manage security settings and spend. If you're part of a team, hubs are shared across other team members in your subscription. For more information about the relationship between hubs and projects, see the hubs and projects overview documentation.
When you create a new hub, you must have Owner or Contributor permissions on the selected resource group. If you're part of a team and don't have these permissions, your administrator should create a hub for you.
Tip
While you can create a hub as part of the project creation, you have more control and can set more advanced settings for the hub if you create it separately. For example, you can customize network security or the underlying Azure Storage account. For more information, see How to create and manage an Azure AI Foundry hub.
When you create a new hub as part of the project creation, default settings are provided. If you want to customize these settings, do so before you create the project:
In the Create a project form, select the arrow on the right side.
Select an existing Resource group you want to use, or leave the default to create a new resource group.
Tip
Especially for getting started we recommend you create a new resource group for your project. The resource group allows you to easily manage the project and all of its resources together. When you create a project, several resources are created in the resource group, including a hub, a container registry, and a storage account.
Select a Location or use the default. The ___location is the region where the hub is hosted. The ___location of the hub is also the ___location of the project. Azure AI services availability differs per region. For example, certain models might not be available in certain regions.
Select Create a project. You see progress of the resource creation. The project is created when the process is complete.
Python SDK
from azure.ai.ml.entities import Project
my_project_name = "myexampleproject"
my_display_name = "My Example Project"
hub_name = "myhubname" # Hub resource name
hub_id = f"/subscriptions/{subscription_id}/resourceGroups/{resource_group}/providers/Microsoft.MachineLearningServices/workspaces/{hub_name}"
my_project = Project(
name=my_project_name,
display_name=my_display_name,
hub_id=hub_id
)
created_project = ml_client.workspaces.begin_create(workspace=my_project).result()
Azure CLI
az ml workspace create --kind project --hub-id {my_hub_ID} --resource-group {my_resource_group} --name {my_project_name}
my_hub_ID
syntax: /subscriptions/{subscription_id}/resourceGroups/{resource_group}/providers/Microsoft.MachineLearningServices/workspaces/{hub_name}
View project settings
Portal: Open project Overview to see name, subscription, resource group. Use Management center for shared assets or Manage in Azure portal for underlying resource.
Python SDK:
ml_client = MLClient(workspace_name=my_project_name, resource_group_name=resource_group, subscription_id=subscription_id, credential=DefaultAzureCredential())
Azure CLI:
az ml workspace show --name {my_project_name} --resource-group {my_resource_group}
Access project resources
Shared from hub: connections, compute, network configuration.
Project-scoped:
- Components (datasets, flows, indexes, deployments)
- Project connections
- Storage containers & file share:
- workspaceblobstore – default data uploads
- workspaceartifactstore – components & metadata
- workspacefilestore – files from compute & prompt flow
Note
Storage connections may delay creation when storage public access is disabled until first private network access.
Delete projects
- Open hub in portal.
- Management center > Overview.
- Select projects to remove.
- Delete project.
Delete hub (with all projects): In Hub properties, select Delete hub to open Azure portal hub deletion.