Exercise 02: Build the Caldova Procurement Desk agent
Before you start: Complete Exercise 0: Prepare your environment, including Step 3 (import the flow). You need the Caldova Launch Team SharePoint site with the RFP Tracker, Supplier Directory and FollowUpRequests lists, the imported solution Caldova Follow-up (lab asset) with the RecordFollowUp flow turned on, and the Caldova Procurement Users security group with your account as a member. This exercise doesn't use the Fabric capacity, so you can keep it paused.
Use the imported agent flow in your assigned tenant. Runtime section 6 describes the Container App/API engineering reference, which has a separate request ID and authorization contract.
Scenario
Alex in procurement keeps asking the same two questions: which RFPs are still open, and who is the contact at each contract manufacturer. Caldova wants an agent that answers from the approved procurement lists only, never treats a directory listing as a manufacturing qualification, and can record a follow-up request on an open RFP without creating duplicates or acting without the requester's confirmation.
Objectives
After you complete this exercise, you'll be able to:
- Create a Copilot Studio agent that answers only from approved SharePoint knowledge, with citations.
- Add a cloud flow as a tool that runs only after explicit confirmation and returns the same receipt when a request is retried.
- Publish the agent to Teams and limit who can use it to a security group.
Duration
Estimated time: 60 minutes
| Task | What you build | Time |
|---|---|---|
| 01 | Agent Caldova Procurement Desk with two SharePoint knowledge sources |
20 min |
| 02 | Tool RecordFollowUp with confirmation and fixed caller identity |
25 min |
| 03 | Teams channel shared with Caldova Procurement Users |
15 min |
Important: Build this agent with the standard orchestration experience, as described in Task 1. The new default agent experience in Copilot Studio can't attach Power Automate cloud flows as tools, so Task 2 wouldn't be possible there.
Task 01: Ground the agent in approved procurement knowledge
Introduction
An agent that searches the web or any site it can reach will eventually answer a procurement question from the wrong source. Here the approved sources are two SharePoint lists, and each one has a clear purpose.
Description
In this task, you'll create the agent, give it its instructions, turn off general web knowledge and connections from other agents, and add the two lists as knowledge with descriptions that tell the agent what each list is for. Estimated time: 20 minutes.
Success criteria
- The agent answers "Which RFPs are open?" with RFP-01 and RFP-02 only, and cites the RFP Tracker.
- The agent states that being in the Supplier Directory does not establish manufacturing qualification.
- Web Search and Let other agents connect to and use this one are both off.
Learning resource
- Agent instructions (Procurement Desk block)
Key tasks
Key task 01: Create the agent with standard orchestration
Expand this section to view the solution
-
Open https://copilotstudio.microsoft.com and check that the environment selector at the top right shows the environment you prepared in Exercise 0.
-
On Home, scroll to Explore what else is possible with agents and select Build with standard orchestration, then Agent (Standard). Don't use the Agent button at the top of Home: it creates the new agent experience, which can't use cloud flows as tools.
-
Name the agent
Caldova Procurement Deskand create it. Wait until the overview page shows the agent as ready.

-
In Instructions, select Edit and paste the Procurement Desk block from
Labfiles\04-caldova-agents\agent-instructions.md. It starts withYou are Caldova Procurement Desk, assisting Alex in procurement.Select Save.
Expected result: The instructions tell the agent to answer only from approved procurement knowledge, to cite sources and record IDs, to use RecordFollowUp only after confirmation, and to say that the capacity decision service is not yet connected.
Key task 02: Remove sources and connections the agent doesn't need
Expand this section to view the solution
-
Select Settings (top right). Under Connected agents, find Let other agents connect to and use this one. It's on by default. Turn it off and select Save. Nothing in this lab needs other agents to call the Procurement Desk.


-
Close Settings and go back to Overview. Under Knowledge, turn Web Search off. A procurement answer must never come from the public web.


Key task 03: Add the two lists as knowledge
Expand this section to view the solution
-
Under Knowledge, select + Add knowledge and then SharePoint.

-
Select Browse items to open the SharePoint picker.

-
Under Recent, select RFP Tracker and Supplier Directory. If you don't see them, use Quick access or search for the site name Caldova Launch Team. The "last modified" date shown for the lists can be out of date. That doesn't matter as long as the list names and the site are right.

-
Add a description to each knowledge source. The agent uses these descriptions to decide which source answers which question, so copy them exactly:
Knowledge source Description Supplier Directory Procurement contact list for suppliers. Being listed here is NOT a manufacturing qualification record. Use it only for supplier contacts.RFP Tracker Procurement RFP tracker: RFP ID, supplier ID (CMO-01 style), service, status (Open or Closed) and last update. Use it for RFP status questions.
-
Select Add. Both sources show as indexing for a minute or two. Wait until they're ready.

Key task 04: Test the grounding
Expand this section to view the solution
-
Open the Test pane and ask
Which RFPs are open right now, and with which suppliers? -
The first time, the agent shows a Connect to continue card for SharePoint. Select Allow. The agent reads the lists with your own permissions.

-
Check the answer against the success criteria: RFP-01 (CMO-01) and RFP-02 (CMO-02) are open, RFP-03 isn't listed because it's closed, and the answer cites the RFP Tracker.


Expected result: Two open RFPs with record IDs and citations, and the statement that directory inclusion does not establish manufacturing qualification.
Task 02: Add a confirmed, idempotent follow-up action
Introduction
Reading data is low risk. Writing data is not. The RecordFollowUp flow writes one row to the FollowUpRequests list and returns a receipt. Two things must hold: the agent never runs it without the requester's explicit yes, and a retried request never creates a second row.
Description
In this task, you'll add the flow as a tool, require confirmation before it runs, fix the caller identity to the signed-in user so the model can't fill it in, and test the happy path, a retry, an invalid RFP and an out-of-scope request. Estimated time: 25 minutes.
Success criteria
- The agent asks for confirmation and writes nothing until you reply Yes.
- Sending the same request again returns the same receipt and adds no row. Reusing its client request ID with changed text or another authorized test caller is rejected without a new row or a receipt.
- A follow-up on a closed or unknown RFP is rejected without calling the tool.
- A request to mark a supplier as qualified is refused.
- A failed or timed-out write returns a receipt only when the matching stored item can be verified.
Learning resource
- Solution Caldova Follow-up (lab asset), imported in Exercise 0
Key tasks
Key task 01: Add RecordFollowUp as a tool
Expand this section to view the solution
-
In the agent, select Tools and then + Add a tool.

-
Select the Flow filter, then select RecordFollowUp.

-
Select Add and configure.


-
Replace the description with the following. The agent reads this text to decide when the tool applies:
Records one follow-up request on an open RFP in the FollowUpRequests list and returns a receipt. Call it only after the user has named an open RFP and explicitly confirmed the follow-up. Never use it to qualify, approve or change a supplier.
Key task 02: Require confirmation and fix the caller identity
Expand this section to view the solution
-
Under Additional details, set Ask the end user before running to Yes. For How do you want to ask the user? choose Send specific response and enter:
I'm about to record one follow-up request on this RFP. Please check the RFP ID, the request text and the client request ID, then confirm.
-
Under Credentials to use, keep End user credentials.
-
Under Inputs, leave
rfp_id,request_textandclient_request_idon Dynamically fill with AI.
-
For
caller_oid, change Fill using to Custom value, open the variable picker, select the System tab and choose User.Id. The flow now records who asked, and the model can't write a different identity.

-
With your coach, inspect the flow and its SharePoint connection reference in the imported solution. Verify that the flow only appends follow-ups and exposes no supplier-qualification or manufacturing write action. Check the connection account's effective permissions on the SharePoint lists separately.
caller_oidrecords the requester. SharePoint operations run with the flow connection account's permissions. -
Select Save.

Key task 03: Test the action
Expand this section to view the solution
-
In the Test pane, select New test session and type
Record a follow-up for RFP-02 asking for the earliest available fill-finish slot. Use client request ID LAB-FOLLOWUP-01. -
The agent prepares the inputs and shows your confirmation message. Check that it shows RFP-02 and LAB-FOLLOWUP-01. Don't confirm yet.


-
Open the FollowUpRequests list in SharePoint in another tab. There's no new row yet, because the flow hasn't run.
Note: The activity view in the Test pane can show the tool step before you confirm. That doesn't mean the flow ran. The list is the evidence: no row until you confirm.
-
Back in the Test pane, reply
Yes. The agent returns a receipt with a Receipt ID. Note the number.
Note: Reply with a plain Yes. A longer reply such as "Yes, I confirm." can be picked up by the Escalate system topic instead of the confirmation, and the agent then offers to hand you to a person. If that happens, send
Yeson its own. -
Send exactly the same request again, with client request ID LAB-FOLLOWUP-01, and reply
Yes. The flow reports Duplicate and the agent returns the same Receipt ID. No new row is created.
-
Send another confirmed follow-up for RFP-02 with changed request text and the same client request ID
LAB-FOLLOWUP-01. Verify the request is rejected, no receipt is returned, and the list count stays the same. With your coach, repeat the original confirmed request using a second authorized test identity and the same client request ID. Verify rejection, no receipt, and an unchanged list count again. -
Type
Record a follow-up for RFP-09 asking for a price update. Use client request ID LAB-FOLLOWUP-02.The agent checks the RFP Tracker, reports that RFP-09 isn't an open RFP, lists the RFPs it found and doesn't call the tool.
-
Ask
Mark CMO-02 as qualified.The agent refuses: it can't change supplier qualification.
-
Refresh the FollowUpRequests list. It has exactly one row per distinct request you confirmed, with status Confirmed and CallerOid set to your own Entra object ID.

-
If your coach provides an isolated flow-failure test, verify that a failed write reports failure unless the flow can verify a matching stored item and real receipt. Inspect the list and record expected rejections separately from unexpected tool failures. For an uncertain write, retry with the identical caller, RFP, request text, and client request ID. If a safe failure test is unavailable, record it as Not run.
Expected result: One row per confirmed request, the retry reuses the existing receipt, and nothing was written for RFP-09 or for the qualification request.
Task 03: Publish to Teams for a controlled audience
Introduction
Publishing makes the agent available, and sharing decides who can use it. Caldova wants only the procurement team to reach the Procurement Desk.
Description
In this task, you'll publish the agent, add the Teams and Microsoft 365 Copilot channel, share it with the Caldova Procurement Users security group as end users only, and test it in Teams. Estimated time: 15 minutes.
Success criteria
- The agent is published and the Teams and Microsoft 365 Copilot channel is added.
- Caldova Procurement Users has End user access, and Everyone in organization has no permissions.
- In Teams, a member of the group gets the same grounded answers as in the Test pane.
Key tasks
Key task 01: Publish and add the Teams channel
Expand this section to view the solution
-
Select Publish (top right) and confirm.

-
The dialog shows Your agent runs tools that use the author's credentials. Select View 1 tool and check that Credentials to use for RecordFollowUp shows End user credentials, then select Publish. Leave Force newest version cleared.


-
Select Channels. If it isn't visible, select +2 next to the tabs and then Channels.

-
Select Microsoft 365 and Microsoft Teams, keep Make agent available in Microsoft 365 Copilot selected and select Add channel.


Key task 02: Share with the security group only
Expand this section to view the solution
-
Select Availability options, then Show to my teammates and shared users.


-
In Add a name, group, or email, type
Caldova Procurementand select Caldova Procurement Users.
-
Check that only End user access is selected for the group, then select Share. Don't change Everyone in organization.


Note: The dialog reminds you that everyone you share with needs the Basic User security role in the environment. You assigned it to the group in Exercise 0.
Key task 03: Test in Teams
Expand this section to view the solution
-
Go back to the channel panel and select See agent in Teams. If Teams asks, select Use the web app instead.
-
On the agent's page in Teams, select Add, then Open.



-
Ask
Which RFPs are open right now, and with which suppliers?Teams asks for its own SharePoint consent the first time, separately from the Test pane. Select Allow.

-
Ask
Should we move the Q3 batch to CMO-02 to free up capacity?The agent explains that the capacity decision service isn't connected yet and doesn't invent a recommendation. Exercise 3 shows how that decision service is built and how it connects.
-
With your coach, verify that publishing to Teams hasn't changed access to restricted manufacturing sources. Record Teams audience access and source permissions separately.
Expected result: Same grounded answers as in the Test pane, and no capacity recommendation.