All Set / Initialize variable blocks in Copilot Studio returning null after publish

Eunchan Lim 0 Reputation points
2026-07-10T08:47:51.8933333+00:00

I have an extensive workflow that has 10+ sets and initalize variable blocks in copilot studio. Today, I edited something in the workflow that is completely unrelated to the variables, some compose further down the line from the initializes. Suddently after I successfully publish, and tried to test run it, the test run fails in the earlier initialize blocks, nowhere near my new addition below. Turns out copilot studio has nulled all my set / initialize blocks. When will this bug be fixed?

Microsoft Copilot | Other
0 comments No comments

1 answer

Sort by: Oldest
  1. AI answer

    2026-07-10T08:48:50.02+00:00

    This behavior matches known issues where publishing an agent or flow surfaces expression/reference problems due to missing or broken dependencies, rather than a simple transient “bug” in the Set/Initialize blocks themselves.

    Because the context doesn’t provide a specific fix timeline, focus on diagnosing and stabilizing the solution so the variables no longer resolve to null after publish:

    1. Use Copilot’s publish‑error assistance (when available)
      When saving or publishing the agent flow, if an error appears in the message bar, select Assist me. Copilot will open a pane, review the flow and error details, and give step‑by‑step guidance to fix save/publish issues in the designer.
    2. Check for missing dependencies in the solution
      Expression errors like IdentifierNotRecognized or invalid references often mean components required by your flow (including variables, environment variables, connection references, or workflows) aren’t fully included in the solution:
      1. In Power Apps (make.powerapps.com), open the solution that contains the agent.
      2. Go to Objects and verify that relevant components are present, especially:
        • Workflows
        • Environment variables
        • Connection references
      3. For each component showing Not Recognized, open the command menu (), select Advanced, then Add required objects.
      4. Repeat Add required objects for the main Agent component to automatically include all dependencies.
      5. Export the solution again so the updated dependencies are captured, then re‑import/publish and retest.
    3. Test the agent flow in the designer after publish
      After publishing, run tests directly in the flow designer to confirm variable initialization and Set blocks behave correctly:
      1. Save and publish the flow.
      2. On the canvas menu, select Test to open Test Flow.
      3. Choose Manually or Automatically.
      4. In Run Flow, select TestRun flow and verify each action’s output, including the Initialize/Set variable steps. A green checkmark indicates success.
      5. Select Done.
        Testing here doesn’t consume Copilot Studio capacity and helps isolate whether failures are due to publish/solution issues or downstream changes.
    4. If the issue persists, open a support case
      If variables still resolve to null or initialization fails after following the dependency steps, create a support case with Microsoft Support for Copilot Studio. Include:
      • Network trace capturing the publish/test errors
      • Full error details from the publish or test run
      • Screenshots of solution layers, agent dependencies, and any conflict views
      • A description of the recent changes (including the compose edits) and steps already tried
      • The solution .zip file, if possible
        This allows the product team to confirm whether the behavior is a known service issue and advise on workarounds or fixes.

    Because the documentation doesn’t specify a public ETA for a fix, treating this as a dependency/publish issue and escalating via Support is the recommended path.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

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.