Forum Discussion
Azure AI Foundry/Azure AI Service - cannot access agents
you need to use the full project endpoint URL, which looks like this: https://<your-service>.services.ai.azure.com/api/projects/<your-project-id>. You can find this exact URL by opening your project in the Foundry portal and checking the Overview or API tab. It is important to use the real project ID from the URL and not just the project name. Once you have the correct endpoint, you can authenticate using Azure Active Directory credentials or an API key with the proper role assigned, such as Azure AI User. Then, you can list agents using a GET request to https://<your-service>.services.ai.azure.com/api/projects/<your-project-id>/agents?api-version=2025-05-16, create a thread with POST to /threads, send a message with POST to /messages, run the agent using POST to /runs, and retrieve the results with GET to /runs/{runId}/steps. These API calls follow the same structure as the Azure OpenAI Assistants API. More information is available in the official Microsoft documentation at Quickstart - Create a new Azure AI Foundry Agent Service project - Azure AI Foundry | Microsoft Learn