Hi EV CV
The error you are encountering occurs because the AIProjectClient.init()
method requires three mandatory parameters: subscription_id
, resource_group_name
, and project_name
. To resolve this issue, ensure you provide these parameters when initializing the client in your Python code. First, verify that you are using the correct subscription ID, which can be retrieved using the Azure CLI command az account show --query id --output tsv
. Additionally, confirm that your resource group name matches the one used in your Azure AI Foundry deployment by listing available resource groups using az group list --query "[].name" --output tsv
. Lastly, make sure that the project name is correctly configured in Azure AI Foundry.
When initializing AIProjectClient
, you should provide all necessary parameters along with proper authentication using DefaultAzureCredential
. Below is an example of a properly structured initialization:
from azure.ai.foundry import AIProjectClient
from azure.identity import DefaultAzureCredential
credential = DefaultAzureCredential()
client = AIProjectClient.init( credential=credential, subscription_id="your-subscription- id", resource_group_name="your-resource-group", project_name="your-project-name")
This approach ensures secure authentication and proper connection to your Azure AI Foundry project. For further details on configuring the connection string, you can refer to the official Microsoft documentation: Configure Project Connection. Additionally, if you are facing persistent issues, you may find relevant troubleshooting discussions in the Azure SDK for Python GitHub repository
Thanks