agent flows
25 TopicsHow to manage costs for Copilot Studio agents
The Microsoft Copilot harness gives agents deeper reasoning: they can plan multistep work and adapt as they go, so an agent can take on a task like researching a customer issue across several systems and drafting the reply, instead of answering one question at a time. Its introduction also adds to a broader shift toward usage-based billing in Copilot Studio. Alongside licensing-based costs, teams need to plan for costs that vary with the work agents perform and how often people use them. Managing those costs effectively becomes a continuous process, not just a point-in-time decision. The Power Platform admin center’s cost controls provide an environment-based foundation for managing Copilot Studio credits. The newer Agent 365 cost management capabilities in the Microsoft 365 admin center add spending policies for agents and environments, with identity-scoped policies coming soon. This blog focuses on how these capabilities relate to each other and help manage Copilot Studio agent costs, from maker estimates to admin funding, limits and monitoring. Cost management as a team effort Cost management works best when makers and admins share it. Makers decide how an agent is built, such as which tools it calls and how many steps it takes, so they are first to see which designs use the most credits and can trim them without hurting the result. A support agent that resolves a case in three steps costs less than one that takes ten. For admins, the work is to plan how many credits each environment or agent needs, control spend with limits and alerts, and review actual usage against the plan. That means predictable bills, no surprise shutdown of a critical agent and a clear view of which agents are worth their credits. Admins often work in two places: the Power Platform admin center and Agent 365 cost management in the Microsoft 365 admin center. Makers and Admins need to work together for cost management For makers: measure and forecast agent usage Follow consumption from build to production Makers make the design choices that drive cost, such as which tools an agent calls and how many steps it takes. Seeing credits while they build lets them optimize an expensive design before it reaches users. Each experience below shows a different view of the same workload, and not every build or test activity is billable for every harness, so check yours first. Learn how estimated credit usage works across these views. Preview: test a task and see its estimated credits as you go. Run the same task before and after a design change to compare the two. The estimate is for comparing designs, not a bill. Evaluate: run an evaluation to see the estimated credit total, then open individual conversations to find the ones that cost the most. Grading is counted separately from the agent’s responses and is a one-time evaluation cost, not a production charge. Monitor: after the change is published, check final usage in analytics to confirm the saving held up. It appears after a reporting delay, and some views are still rolling out, so check what your tenant shows. Makers can see credit consumption throughout building, testing, and evaluation experiences in Copilot Studio Project future costs from existing tasks The credit estimates in Preview, Evaluate and Monitor give you real per-task numbers to forecast from. Sample the kinds of work people will ask the agent to do, run each a few times, and record the credits per completed task, including failed attempts and retries. Example: forecast monthly credits Illustrative numbers for an agent that answers employee questions. Formula: monthly task volume × average credits per completed task Task type and calculation Monthly credits Simple lookups 1,000 tasks × 5 credits 5,000 Multistep requests 300 tasks × 20 credits 6,000 Exception cases 50 tasks × 40 credits 2,000 Total monthly forecast 13,000 5,000 + 6,000 + 2,000 = 13,000 credits / month For admins: plan, control and optimize spending Understand the relationship between PPAC and MAC cost management Copilot Studio has built-in cost controls in the Power Platform admin center. Admins can set credit allocations for prepaid capacity, view usage reports, cap an individual agent’s usage and configure pay-as-you-go (PAYG) billing, all at the environment level. The recently launched Agent 365 cost management in the Microsoft 365 admin center adds spending policies with limits for resources and identities, the same way you manage other usage-based AI services such as Work IQ and Copilot Cowork. You can use either place today. Going forward, we recommend Agent 365 cost management for more flexibility and one consistent way to manage cost across Microsoft’s usage-based billing services. Agent 365 also helps you track business value, not just spend. Business Analytics (in Frontier) brings AI spend, usage and value together, maps activity to business use cases, and estimates value with signals such as assisted hours, success rate and dollar value. You can move to Agent 365 cost management at your own pace, one environment at a time. Your existing Power Platform admin center setup stays in place until you create a policy for an environment, and the new policy then takes over for that environment. Microsoft Learn has the details on how to manage Copilot Studio costs in the Microsoft 365 admin center. Agent 365 cost management unifies Copilot studio cost management Foundational cost management for Copilot Studio in Power Platform admin center Cost management for Copilot Studio started in the Power Platform admin center, and it follows the same flow now used across Microsoft’s cost management surfaces. Monitoring is the baseline that runs through all of it: the same visibility into usage informs how admins plan, control and optimize. Plan capacity around real usage Forecasts are only as good as the usage behind them. The licensing hub shows prepaid versus consumed capacity, pay-as-you-go usage and a daily consumption trend by environment, so admins plan from actual demand. With environment credit allocation, they then set aside credits for each environment, ring-fencing capacity for priority workloads such as production. Allocation versus limits Allocation: How much is set aside? An allocation reserves credits for an environment, setting that capacity aside for its workloads. Limit: How much can be used? A limit caps how much an agent can use without reserving anything. Keep spend within bounds as adoption grows One popular agent should not use up an environment’s capacity. Agent credit limits cap what an individual agent can use, and overage notifications warn admins when an environment is nearing capacity, early enough to act. The Draw from tenant credit pool environment group rule goes further, stopping environments from tapping shared capacity once their own allocation runs out. It applies to every environment in the group, including new ones such as personal developer environments, so governance stays proactive instead of reactive. Direct credits to the work that matters When demand spikes, capacity overage settings decide what happens next: draw on available tenant capacity or bill to a pay-as-you-go billing plan linked to an Azure subscription, so agents keep running. Usage reports by environment, agent and user then show which agents drive consumption, guiding where to rebalance credits and where to invest. PPAC is a solid foundation for this flow, and it is built around environments. As AI spend extends beyond environments to people and agents, MAC brings the same plan, control and optimize flow to those scopes, while environments continue to be administered in PPAC. What Agent 365 adds to cost management Copilot Studio cost management is coming to the Microsoft 365 admin center (MAC), the place admins already manage spending for other usage-based AI services such as Cowork and Work IQ. It brings resource and environment control to Copilot Studio today, with identity-scoped policies coming soon, so a budget can follow who owns the work rather than only where it runs. A spending policy can apply to a resource such as a specific agent, to one or more environments, or to an identity: people or groups. Resource and environment policies are in public preview now, and identity-based policies are coming soon. Nothing is rebuilt: resources and environments stay where they are in PPAC, and only the budget moves. Copilot Studio now appears in the Microsoft 365 admin center services picker. Confirm scope eligibility in your tenant. Fund the work the way you own it Before, credits and billing were set at an environment level. With MAC, a spending policy answers three questions in one place: how much can be spent, which services are in scope and how it is funded. A spending policy has a flexible scope, which can cover a single agent or a group of resources or environments, each with its own limit and billing method, so a department’s agents or a critical agent can be funded on their own terms. Resource scope: a policy can cover environments or specific assets. Demo labels and fields can vary by tenant and rollout. Billing method: prepaid and pay-as-you-go choices for a policy. Eligibility and permissions apply; demo balances are illustrative. Stop overspend at the limit you set Before, prepaid credits were capped per environment, pay-as-you-go had no cap and agent limits were set one by one. Now a policy limit applies to prepaid and pay-as-you-go alike, so spending stops where you set it. A single all-environments policy can add a default per-agent limit that also covers agents built next week, and alerts reach the people who can act before a limit is hit. With a spending policy in place, either in the Power Platform admin center or in Agent 365 cost management in the Microsoft 365 admin center, there is no runaway spend. See where every credit goes MAC cost management reporting brings consumption into one view, with spend attributed to agents and services so admins can spot growth early. Linking a policy to an Azure subscription and resource group lets each department see and own its cost. MAC consumption overview. Mix and match policies for a layered approach Policy types work together. Resource and environment policies suit shared work, such as an HR team funding all its agents or giving one critical agent like AskHR its own limit. Identity policies, once available, suit personal work, such as a budget for makers building and testing agents. For covered usage, MAC takes precedence over PPAC and an agent’s resource or environment policy comes before an identity policy, and the two budgets are never combined. Start now: assign roles, then pilot one environment. Nothing changes until you create a policy and link an environment, so you can move one environment at a time and add identity-based policies as they arrive. The five readiness steps in Get started show how. Learn more in Microsoft Learn: Manage Copilot Studio costs in the Microsoft 365 admin center Apply the settings to common scenarios These two illustrative patterns start with who owns the cost. Identity-scoped policies are coming soon, so confirm eligibility in your tenant. Scenario 1: Fund critical agents or environments “We need to manage AskHR’s costs, so users don’t have to self-fund.” AskHR’s cost belongs to HR, not to every employee who chats with it. The admin applies a resource-scoped policy to the agent, or an environment-scoped policy to the environment it runs in, with a limit, alerts and an approved funding source. All consumption then rolls up to one budget that HR’s owner monitors. Makers review task paths and completion rates; the admin reviews actual spend and headroom. Scenario 2: Fund users to support experimentation “I want my makers to build, with a personal spending limit.” The admin applies an identity-scoped policy (coming soon) to the maker security group, so each maker gets a personal budget to experiment with without first asking for an environment budget. The admin enables the work, and makers stay accountable for what they spend, using Preview and evaluation estimates to compare designs. Get started Five steps from plan to practice: Assign roles before you create your first policy. Spending policies live in the Microsoft 365 admin center, which uses its own roles, so existing Power Platform roles don’t carry over automatically. Here is who needs what: Power Platform or Dynamics 365 admins → AI Administrator, to set spending policies. Not granted automatically. Environment admins → AI Reader, to see spend for their environment. Global admins → no change. Tenant-wide access, including billing, stays as is. Makers → no new role. They keep seeing credits in Copilot Studio as they build, test and monitor. Early 2027 (planned): recommended limits based on your usage, recommended roles for your team, and roles set up in code. Review what you have today: credits, billing plan, agent limits and owner for each environment. Pick the policy type: environment for a department, resource for a critical agent, identity for makers (coming soon). Pilot one environment: set limits and alerts, and link the Azure subscription for chargeback. Expand: one environment at a time, adding identity policies as they arrive. Go deeper in the docs: Resource and environment policies in MAC Identity policies PPAC cost controls734Views0likes1CommentCopilot Studio agent: OpenAIModelTokenLimit, ContentFiltered, duplicate replies and raw JSON in chat
Hi everyone, While testing an agent in Copilot Studio, I’m running into the following errors and would appreciate any guidance. OpenAIModelTokenLimit: “The request is resulting in too much data to handle” The agent returns this error instead of an answer, even for short, single questions. Repeated messages A single question produces two answers in the same turn: a structured answer, then a rephrased version of the same content. The activity map shows the same step running twice in that turn. Follow-up questions from the agent also sometimes appear twice. ContentFiltered: “The content was filtered due to Responsible AI restrictions” Raw JSON shown alongside the rendered answer Intermediate “thinking” messages Intermediate, thinking-style messages occasionally appear in the chat before the final answer. Questions What typically causes OpenAIModelTokenLimit when the question itself is short? What’s the recommended way to prevent duplicate answers in the same turn? How can I stop raw JSON from being displayed to the user? Is there a way to suppress the intermediate messages? These responses come from the parent agent, which is connected to a child agent. Only the child agent has the knowledge sources needed to answer questions, and the parent agent’s instructions route all questions to it.86Views0likes1CommentPass a variable in topic to agent flow
Hi there, How do we pass an output variable from a topic to be used as input in agent flow? I have stored the output of an action into a variable. In my agent flow, I could not find my variable from my topic. Any advice how to do that? Thank youSolved72Views0likes4CommentsAll Copilot Studio Workflow Tools Suddenly Returning HTTP 403 Before Execution
Hello Copilot Studio Community, I am experiencing an authorization issue with multiple workflows connected to an agent built using the Copilot Studio new experience and new Workflows experience. These workflows worked successfully for multiple users yesterday. Today, all workflow tools connected to the agent began returning an immediate HTTP 403 authorization error. I did not intentionally change the agent, workflows, environment, or workflow permissions before the issue started. Error message: You don’t have permission to use this tool. You’re signed in, but access to this resource is blocked. Error details: Authorization - 403 Example error information: Status: Failed Error message: Flow returned HTTP 403 Error code: Http403 Inner error code: NotSpecified Tool duration: Approximately 93 milliseconds Configuration: - Copilot Studio new agent experience - Copilot Studio new Workflows experience - Agent and workflows are in the same Power Platform environment - Workflows use the "When an agent calls the workflow" trigger - Each workflow includes a "Respond to the agent" action - Workflows are saved and published - Agent is saved and published Observed behavior: The problem affects several independent workflows, including: - New-request submission - Current-user identity resolution - Approval decisions - Requester justification - Executive decisions - Fulfillment updates For every affected workflow: - The agent fills the workflow inputs correctly. - The tool call fails almost immediately. - No corresponding run appears in the workflow Activity history. - The workflow trigger is never reached. - No workflow actions execute. Because no workflow run is created, the rejection appears to occur before workflow execution, possibly within the Copilot Studio agent-to-workflow authorization or invocation layer. Troubleshooting already completed: - Confirmed that all workflows are published. - Confirmed that the agent is published. - Tested in a completely new conversation. - Removed an affected workflow tool from the agent. - Saved the agent. - Added the same published workflow back to the agent. - Reconfigured and verified the tool inputs. - Republished the agent. - Confirmed that no workflow Activity run is created. - Confirmed that the issue affects multiple workflows rather than one specific workflow. Removing and re-adding the workflow did not resolve the problem. Questions for the community: 1. Is anyone else currently experiencing HTTP 403 errors when Copilot Studio agents invoke workflows? 2. Is this a known issue or regression in the new Workflows experience? 3. Is there an environment-level or tenant-level permission that controls agent-to-workflow invocation? 4. Could a tenant policy, Conditional Access change, service principal, connection reference, or workflow-sharing configuration cause all workflow tools to fail simultaneously? 5. Where can an administrator find detailed authorization logs when the workflow never creates a run? 6. Has anyone found a workaround for this issue? Any guidance or confirmation from others experiencing the same behavior would be appreciated. I can provide screenshots, complete error details, timestamps, and additional configuration information if needed. Thank you.906Views3likes4CommentsYou don't have access to talk to this bot, contact the owner. copilot studio
I created a copilot studio agent and then embedded it inside a code app. It works fine but i am facing the below error. You don't have access to talk to this bot, contact the owner. copilot studio I have provided Microsoft based authentication and am an owner so will have access to the bot. Yet facing the above issue. Is there something i am missing1.3KViews0likes4CommentsHow to preserve document format and structure with Copilot Agent
Hi everyone, I was building a copilot agent that should be able to accept a document and then make changes to it before returning the new version of that document, which has the same format and structure as the original. What is the best way to accomplish this in copilot studio? So far, I have tried using a power automate flow and external tools but it seems that there is no free included tool that can achieve this task. All the document writing tools seem to be paid services requiring API keys. Is there an alternate free way of achieving this task? Thank you687Views0likes2CommentsHelp building an Agent Flow to access specific folders in Sharepoint
Hi all, I am building an agent that needs to access specific subfolders (based on folder identifier) and then analyse this folder against the instructions for the agent. The planned flow is: User enters folder identifier (e.g. Vehicle registration number) The CoPilot Studio Agent uses an Agent Flow to find the Registration number folder within the SharePoint repository (which contains many folders for different cars). The Agent Flow helps the agent access the specific car's folder. The agent runs the instructions for this specific car, analysing the subfolders (e.g. Insurance documents, fuel expense history) to return to the user the outcome of the analysis for each subfolder within that registration's folder. My issue is getting the SharePoint access Agent Flow to work. I have tried using CoPilot chat to assist, but it gives a million different ways to accomplish the same thing. I understand that I need to trigger the flow, using "CarReg" as the input. Then I can use Get Files (Properties Only) to return and filter by folders to find the car registration. But now I only have the folder names, and not the underlying files for my agent to use. Also, once I perform the filter to get the relevant folder, I have many options of passing this back to the agent, such as via HTML tables or Compose. Is there a preferred method? Thanks, H777234Views0likes1CommentCredits usage for Copilot Studio Workflow with agents
If I add an agent(for research and analyze from the JSON provided) in Copilot studio recurring workflow, whose and which credits will be used whenever it runs? Hi Team, I have a question regarding licensing and credit consumption in Copilot Studio. I have created a Copilot Studio agent that performs research and analysis based on a JSON payload. I am planning to invoke this agent from within a Copilot Studio recurring workflow that runs on a schedule. Could you please clarify the following: When the recurring workflow executes and calls the agent, whose credits are consumed? The user who created the workflow? The owner of the agent? The account under which the workflow runs? The environment's pooled credits? Are there separate credit charges for: Workflow execution Agent invocation Generative AI/research actions performed by the agent Any guidance or documentation links explaining the credit consumption model for this scenario would be greatly appreciated. Thank you!569Views0likes3CommentsNew workflow designer accessing environment variables
Hi, I really enjoy using the new workflow designer. I've a triggered workflow (Email arrives) that I added into a solution. I'd like to use environment variables from within the workflow. The variables and the workflow are in the same solution. Unfortunatly the environment variables are not visible like they were in the old designer. How can I access them ? Thanks in advance1KViews0likes4CommentsCopilot Studio Agent Tool Not Detecting File Input from Power Automate Flow
Hi everyone, I'm facing an issue with Copilot Studio and Power Automate Agent Flows. I created a flow using "When an agent calls the workflow" with the following inputs: RequestPayload (Text) AttachmentFiles (File) The flow saves successfully and the File input is visible in Power Automate. However, when I add the flow as a Tool in Copilot Studio, only the text input is detected: RequestPayload The File input (AttachmentFiles) does not appear in the Tool Inputs section. What I've tried: - Removed and re-added the tool - Refreshed the tool schema - Created a brand-new V2 flow - Changed the File input name multiple times (AttachmentFiles, UploadedFiles, FuelAttachments, etc.) - Saved and republished the agent - Removed and re-added the flow multiple times The result is always the same. Only the Text input is exposed in Copilot Studio. Additionally, if I manually try to add an input named "AttachmentFiles" in the Tool configuration, Copilot Studio returns: "There is an error: 'DuplicateItem'" This makes it seem like Copilot Studio recognizes the input internally, but it is not rendering or exposing it in the Tool UI. Questions: Are File/File Collection inputs currently supported for Agent Tools in Copilot Studio? Has anyone successfully passed uploaded files from an Agent to a Power Automate flow using Tool inputs? Is this a known limitation or a bug? Is there a recommended workaround for sending PDF/JPG attachments to a flow from an Agent? Any guidance would be greatly appreciated. Thank you.250Views0likes1Comment