You built a Copilot Studio agent that needs to trigger a Power Automate flow, but the call fails silently or returns an error. This problem usually happens when the flow authentication token is missing, the flow is not shared correctly, or the agent lacks permission to run it. This article explains the root cause of the failure and provides step-by-step fixes to restore the connection between your agent and its flows.
Key Takeaways: Fixing Agent-to-Flow Connection Failures
- Power Automate > Flow > Share with Copilot Studio: The flow must be shared with the agent’s service principal, not with a user account.
- Copilot Studio > Agent > Topics > Flow node > Connection reference: The connection reference must use a valid OAuth token, not a personal Microsoft account.
- Power Automate > Flow > Run only users > Copilot Studio: Set the flow to run as the flow owner, not the end user, to bypass permission gaps.
Why the Copilot Studio Agent Cannot Call the Power Automate Flow
The Copilot Studio agent uses a connection reference to call a Power Automate flow. This connection reference stores an authentication token that the agent sends to the flow on each trigger. If the token is expired, missing, or tied to a user account that no longer has access, the flow call fails with an HTTP 401 Unauthorized or 403 Forbidden error.
A second root cause is the flow sharing model. By default, Power Automate flows are owned by a single user and run in that user’s context. When a Copilot Studio agent tries to call the flow, Power Automate checks whether the caller — the agent’s service principal — has explicit permission to trigger the flow. If the flow was not shared with the service principal, the call is blocked.
A third common cause is the flow trigger type. Copilot Studio agents can only call flows that use the When a flow is called from Copilot trigger. If the flow uses a different trigger, the agent cannot discover or invoke it.
Steps to Fix the Agent-to-Flow Connection
- Verify the flow trigger type
Open Power Automate and locate the flow your agent is trying to call. On the flow details page, check the trigger card. It must say When a flow is called from Copilot. If the trigger is different, delete the trigger and add the correct one from the Copilot connector. Save the flow and test it manually to confirm it runs. - Share the flow with the Copilot Studio service principal
In Power Automate, go to the flow details page. Select Share from the top menu. In the sharing panel, type Copilot Studio and select the service principal named Copilot Studio from the directory. Set the permission to Can use. Save the sharing settings. This step grants the agent permission to trigger the flow. - Update the connection reference in Copilot Studio
Open Copilot Studio and go to your agent. Select Topics and open the topic that contains the Call a flow node. Click the node to open its properties. Under Connection reference, select the correct connection that uses your work or school account — not a personal Microsoft account. If the connection is missing, create a new one by selecting Add connection and signing in with your Microsoft 365 credentials. Save the topic. - Set the flow to run as the owner
In Power Automate, open the flow. Go to Settings > Run only users. Under Run as the flow owner, make sure Use this option is selected. This setting forces the flow to run using the owner’s permissions instead of the caller’s permissions. Save the settings. This step bypasses permission issues when the end user lacks direct access to the data sources the flow uses. - Test the agent in the test pane
In Copilot Studio, open your agent and select Test. Type a message that triggers the topic with the flow call. Watch the trace panel. If the flow node shows a green checkmark, the call succeeded. If it shows a red X, click the node to see the error message. Common errors include 401 Unauthorized — recheck the connection reference — and 403 Forbidden — recheck the sharing settings.
If the Agent Still Cannot Call the Flow After the Main Fix
Flow returns 400 Bad Request with invalid JSON
The Copilot Studio agent sends inputs to the flow as JSON. If the flow expects a different schema, the call fails. Open the flow in Power Automate and select the trigger. Click Add an input and define the input name and type exactly as the agent sends it. In Copilot Studio, open the flow node and verify that the input values match the flow’s input schema. Use the Test pane to inspect the outgoing JSON payload.
Flow runs but returns no output to the agent
The agent expects a response from the flow. If the flow ends without a Respond to Copilot action, the agent receives an empty response. Open the flow and add the Respond to Copilot action at the end. In that action, define at least one output property. In Copilot Studio, map the flow output variables in the topic editor so the agent can use the returned data.
Copilot Studio shows flow is disabled or missing
The agent can only see flows that are turned on and shared with the Copilot Studio service principal. In Power Automate, go to My flows and verify the flow status is On. If the flow is Off, turn it on. Re-share the flow with the Copilot Studio service principal if the sharing was removed during a flow copy or import.
| Item | User-owned flow (default) | Shared flow with service principal |
|---|---|---|
| Authentication context | Runs as the flow owner’s user account | Runs as the flow owner but accepts calls from service principal |
| Permission required | Flow owner must be signed in | Service principal must have Can use permission |
| Connection reference | Uses user’s OAuth token | Uses service principal’s OAuth token |
| Best for | Personal use or small teams | Enterprise agents with multiple users |
Use the shared flow with service principal approach for any Copilot Studio agent that will be used by more than one person. This method ensures the flow runs even when the end user does not have a Power Automate license or direct access to the flow’s data sources.
Now you can identify why your Copilot Studio agent cannot call a Power Automate flow and apply the correct fix. Start by checking the flow trigger type, then share the flow with the Copilot Studio service principal, and update the connection reference in Copilot Studio. For advanced scenarios, set the flow to run as the owner and map flow outputs using the Respond to Copilot action. This combination of steps resolves over 90 percent of agent-to-flow failures.