Hi there Rayane Laraki
Thabnks for using QandA platform
Yes thats right the AIProjectClient.from_connection_string()
method has been deprecated in the newer Azure AI Agents SDK. To use the newer AIClient
with PROJECT_ENDPOINT_STRING
, what you now need is the Project Endpoint, which is a URL, not the connection string.
Go to the Azure portal → navigate to your Azure AI Studio (Foundry) project.
On the left, click on "Project details".
- Look for the value labeled “Project endpoint” — this is the
PROJECT_ENDPOINT_STRING
you need. It will look something like:
https://<your-project-name>.<region>.inference.ai.azure.com
If you're only seeing a "connection string", you're probably looking at the wrong field — avoid using that with the new SDK.
from azure.ai.agents import AIClient
from azure.identity import DefaultAzureCredential
client = AIClient(
endpoint="https://<your-project-name>.<region>.inference.ai.azure.com",
credential=DefaultAzureCredential()
)
If this helps kindly accpt the answer thanks much,