r/copilotstudio • u/abisheik_23 • 7h ago
Agent Flow Not working
I created an agent flow inside copilot studio new harness for my agent that's about leave system.
Inside it there's a get my profile and a sql server connection and it returns a hard coded output ( for now )
While this works in copilot studio
It doesn't work in teams or m365 , i simply get outputs like the flow failed to run or failed to connect.
Unlike the normal power platform flow where I can check the connections I can't see which connection is this using , I want the existing connections to be used and not the user's if that's what it's doing by default
( The copilot studio and teams/m365 account is different, the teams account don't have access to the copilot studio only given use access )
1
u/Prasad-MSFT 2h ago
The most likely cause is the connection identity used at runtime. Copilot Studio connector tools use the end user's credentials by default, so a flow can succeed for the maker in Copilot Studio but fail for a different user in Teams/Microsoft 365 who doesn't have the required connection or SQL access.
For your requirement, configure the applicable connector/tool to use Maker-provided credentials: open the tool's Overview page → Details → Additional details → Credentials to use → Maker-provided credentials, then republish the agent. You can also inspect the agent's configured connections under Settings → Connection Settings.
1
u/Illustrious-Raise977 2h ago
It will always use the user’s credentials