Skip to content

V2 Orchestrate: every Microsoft 365 action step fails with "A required retained result is unavailable or changed" #1660

Open

Description

@paullizer

Issue

Since the Microsoft 365 plan-step change in #1644, every orchestration step that uses a Microsoft 365 action (for example M365 Email) fails, in both personal and shared conversations. The run reports "A required retained result is unavailable or changed. No preview was substituted." The same request in manual mode, through an agent with the same action, works.

Steps to Reproduce

  1. Create a personal M365 Email action and connect Microsoft 365.
  2. In V2 chat, turn Orchestrate on and ask "what are my emails".
  3. Let the plan run.

Expected Behavior

The Gather step reads the mailbox, and the answer lists the recent emails.

Actual Behavior

  • The Gather step fails with result_unavailable, and the compose step is skipped.
  • Telemetry: [ORCHESTRATION_EXECUTOR] A dependency-bound step could not complete. with capability_id=action_invoke, error_type=OrchestrationInvocationDeniedError, authority_reason=external_configuration_unavailable.

Impact

Microsoft 365 data can't be used in Orchestrate mode at all. Before #1644 these calls were refused silently (m365_context_required), so Microsoft 365 has not yet returned data inside a plan.

Notes

Root cause:

  1. invoke_action (functions_orchestration_actions.py) enters the Microsoft 365 step scope before the action's acquisition capture (capture_manifest).
  2. The capture's live re-read, _current_action (functions_orchestration_external_metadata.py), calls prepare_action_plugin_manifest inside that scope.
  3. The Microsoft 365 preflight (_preflight_m365_plugin_manifests → _bind_preflight_manifests in functions_m365_execution.py) rebuilds the manifest as a plain dict ({**manifest, ...}), dropping its ScopedActionManifest origin.
  4. get_action_origin(prepared) != origin raises external_configuration_action_origin_required. The outer _read_metadata (functions_orchestration_external_configuration.py) collapses every inner reason into external_configuration_unavailable.

Evidence: the step's Microsoft 365 request records exist with status failed, so the scope was entered and sign-in passed. functional_tests/test_orchestration_m365_actions.py stubs both the capture callback and prepare_action_plugin_manifest, so this interaction was never exercised.

_read_metadata hiding the specific refusal reason also made this hard to diagnose.

Related: #1493.

Activity

  1. added a commit that references this issue on Oct 7, 2026
    e85c06d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Created By CopilotP1Priority 1: urgent, address before P2 workbugSomething isn't working

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions