web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Azure AI Foundry Agent...
Power Automate
Suggested Answer

Azure AI Foundry Agent Service (Preview) "InvokeAgent" fails due to invalid response schema

(1) ShareShare
ReportReport
Posted on by 2

Azure AI Foundry Agent Service (Preview) – InvokeAgent Fails With Schema Error (body/error must be Object but is Null)

 

Hi everyone,

I’m testing the new Azure AI Foundry Agent Service (Preview) connector in Power Automate to call an Azure AI Agent I created in Foundry.

 

The connector validates my request, but the flow fails on the response with this error:

 
Action 'Invoke_Agent' failed:
The API 'azureagentservice' returned an invalid response.
The API operation 'InvokeAgent' requires the property 'body/error'
to be of type 'Object' but is of type 'Null'.
 

What I’m doing

 

  • Using InvokeAgent with:

     

    • body/input = text (OCR result)

    • body/user = string

    • body/agent/type = agent_reference

    • body/agent/name = my agent’s ID

    • body/agent/version = correct version from Foundry 



    •  


  •  

The request passes validation fine.

The failure happens only after the response arrives.

 

Why I think this is a connector bug

The service response does not include an error object, or returns error: null,

but the connector’s schema requires:

 

error: Object (not nullable)
 

So the connector rejects the response even though the call succeeded.

 

What I need help with

 

Is this a known issue with the preview connector?

Is there any workaround, or a planned fix for the schema so error can be null or optional?

 

Thanks!

Categories:
I have the same question (10)
  • Suggested answer
    Sam_Fawzi Profile Picture
    904 Super User 2026 Season 1 on at
     
    You’re most likely running into a schema mismatch in the preview connector rather than an issue with your agent itself. The request goes through correctly, but the failure happens when Power Automate processes the response. The connector’s schema appears to require body/error to be an Object, while the service is legitimately returning error: null or omitting the field. Because the connector doesn’t mark that property as nullable, the response is rejected as “invalid”.
    Before doing anything else, I recommend testing the same agent call using a direct HTTP request:
    If the HTTP call works and returns valid JSON, then the connector is the part failing on schema validation.
    If that’s the case, the next step is to open a support ticket while the connector is still in preview. Include:
    • Connector: Azure AI Foundry Agent Service (Preview)
    • Operation: InvokeAgent
    • Full error text
    • A redacted sample of the raw HTTP response
    Until the connector schema is corrected, the only reliable workaround is to bypass it and use a direct HTTP call to the Agent Service.
  • DG-06030719-0 Profile Picture
    2 on at
    @CU19111542-0

    Were you able to find a solution by any chance?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 468

#2
Haque Profile Picture

Haque 370

#3
Valantis Profile Picture

Valantis 354

Last 30 days Overall leaderboard