Share via

Error when following official guide to publish Foundry Agent via REST API

Eirik Sangolt 0 Reputation points
2026-02-27T08:42:41.9733333+00:00

According to this guide (https://learn.microsoft.com/en-us/azure/ai-foundry/agents/how-to/publish-agent?view=foundry) one should be able to create an Agent Application within Foundry with a few required parameters. I created an agent and verified that I was able to publish it within the Foundry UI, then I created another agent and tried to publish it through the API, but this failed. I get a HTTP 400 with the "SystemError" message. The error response (included below) does not give any direct indication of invalid input, nor anything that helps me much with diagnosing the issue. I followed the example exactly, including request body and headers, replacing only the placeholders. Is there an issue with the service or documentation?

{
  "error": {
    "code": "SystemError",
    "message": "SystemError",
    "details": [],
    "additionalInfo": [
      {
        "type": "ComponentName",
        "info": {
          "value": "managementfrontend"
        }
      },
      {
        "type": "Correlation",
        "info": {
          "value": {
            "operation": "6eb401352419ba7ec419c9d869dc9cce",
            "request": "577cfbf363d96b4b"
          }
        }
      },
      {
        "type": "Environment",
        "info": {
          "value": "swedencentral"
        }
      },
      {
        "type": "Location",
        "info": {
          "value": "swedencentral"
        }
      },
      {
        "type": "Time",
        "info": {
          "value": "2026-02-27T08:37:52.409225+00:00"
        }
      }
    ]
  }
}
Foundry Tools
Foundry Tools

Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform

0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Eirik Sangolt 0 Reputation points
    2026-03-25T11:52:57.6766667+00:00

    I got a response on my ticket that resolved the issue. It turns out that the "displayName" field is required and validation does not properly warn when it is missing. A minimal valid request to create an application is therefore:

    {
      "properties": {
        "displayName": "agent_name",
        "agents": [
          {
            "agentName": "agent_name"
          }
        ]
      }
    }
    

    Hopefully the documentation and validation logic is updated in the future to reflect this requirement.

    0 comments No comments

  2. Anshika Varshney 8,925 Reputation points Microsoft External Staff Moderator
    2026-03-16T19:48:11.6333333+00:00

    Hi Eirik,

    Thanks for sharing the full error. A 400 with code SystemError coming from component managementfrontend usually means the publish workflow failed on the service side before it could return a clean validation message. So it often is not that your JSON is wrong, especially since publishing works from the Foundry UI.

    Here are a few things you can try that have helped in similar cases.

    1. Double check the API version you are using. The publish endpoint can be very sensitive to preview versus stable API versions. Make sure you are using the exact api version shown in the official publish agent guide, and not a different default.
    2. Compare your REST call with what the UI sends. The Foundry UI sometimes includes extra metadata that is not obvious in the minimal example, such as project binding or internal references. The easiest way to confirm is to publish successfully in the UI, open browser developer tools, capture the publish network request, and then compare the request URL, api version, headers, and request body with your REST call. Then replicate the same call outside the browser.
    3. Check whether the region could be part of the problem. Your error shows swedencentral. Some publish capabilities roll out region by region, so you can see create and UI publish working, but a specific REST path still fails in a region due to backend rollout gaps. If you have access to another supported region, testing there helps confirm whether it is region specific.
    4. Verify permissions for publishing. Publishing typically requires higher permissions than just creating or reading an agent. If you can publish in UI but not in REST, it can still be a permission difference depending on which identity is used in your REST call. Make sure the same identity and the right project level role is used for both.

    If after matching the UI request exactly you still get the same SystemError, then it is very likely a backend issue rather than documentation or your payload, because the error contains correlation details but no validation details. In that case, the best thing you can do in the thread is share the operation id, request id, timestamp, and region from the error response in the private chat since those are the only useful clues for backend tracing.

    If this answers your query, please do click Accept Answer and Yes for was this answer helpful.

    Hope this helps you narrow it down.

    Thankyou!


  3. Alex Burlachenko 19,690 Reputation points Volunteer Moderator
    2026-02-27T09:00:17.2633333+00:00

    Eirik hi,

    looks like it is not a validation error in ur payload. A 400 with SystemError from managementfrontend usually means the backend publish workflow failed before proper validation surfaced not that ur json is wrong. If it works from the Foundry UI but fails via REST. IMHO it could be

    Wrong API version. The publish endpoint is very sensitive to preview vs GA versions. Make sure u are using exactly the same API version shown in the doc and not a newer default.

    Missing required hidden fields. The UI often injects internal metadata (like projectId, environmentId, or internal deployment references) that are not obvious in the minimal example. If ur second agent differs even slightly (model, tools, environment binding), publish may fail server-side.

    Region limitation. The error shows swedencentral. Some Agent publish capabilities are still rolling out region by region. It may succeed in one region and fail in another even if creation works.

    RBAC mismatch. Publishing an agent requires more permissions than reading or creating one. Ensure u have Azure AI Developer or Owner at the project scope, not just at resource group.

    Service regression. Since UI publish works but REST does not, and the error is SystemError with empty details, this can indicate a backend issue.

    Try capture the network call from the browser when publishing successfully via UI (DevTools > Network > publish request).

    Compare endpoint URL, api version, exact request body, headers

    Then replicate that exact call in REST.

    If the exact same request still fails outside the browser so open a ticket and add correlation ID, operation ID, timestamp, region swedencentral

    Because a generic SystemError from managementfrontend with no validation details usually requires backend inspection. Given the symptoms, this is more likely a service-side issue or API version mismatch than documentation being wrong.

    rgds,

    Alex


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.