Someone on the operations team builds an agent in Copilot Studio over a single afternoon. She connects it to SharePoint and to the team mailbox, and it answers customer questions from company documents. It works brilliantly, and everyone is happy.
Nobody asked what the agent can read, whose permissions it runs with, or what happens on the day an email arrives carrying instructions she did not write. Not out of negligence. The tools simply let you build faster than anyone stops to ask.
One word, three different things
The word "agent" is used today to describe completely different things. What separates them is not the tool you build with, but how much autonomy you give the agent. And as autonomy rises, the security question changes: it starts with "what data is it exposed to?" and ends with "what can it do in our systems?"
1. A fixed process, with AI helping
The process is defined in advance, step by step, and AI is a helper in one step within it. For example: an invoice arrives as a PDF, the AI extracts the amount, the supplier and the date, and the process feeds them into the ERP. The AI does not decide where the process goes. It only turns a document into data.
This is what most organisations actually need, and the risk here is focused: where the data from the document is sent. If the extraction runs through a public API on an employee's personal key, supplier invoices are leaving for an external server without anyone in IT knowing. That is Shadow AI, however good the intentions.
And there is another side: the platform running the process becomes a target in its own right, because it holds the keys to every system it is connected to.
What to check: that the model runs in a managed enterprise environment, that the vendor does not train on your data, that the automation platform is patched and not exposed to the internet, and that a faulty extraction is caught before it enters the system.
2. An agent that carries out a task
Here you give the model a goal and a few tools, and it decides for itself in what order to use them and when it is done. For example: an agent that prepares a price quote pulls the customer's details from the CRM, checks the price list and drafts a proposal.
From a security standpoint, every tool you connect is another route into a system. An agent that needs to read a price list does not need write access to the CRM. The temptation is to connect "everything, just in case", and that is exactly the temptation to resist.
Three things would have stopped it: a least-privilege token, human approval before any irreversible action, and a backup kept out of the agent's reach.
There is also a principle here about data integrity. On a recent project, we were asked for an HR agent that calculates pay by role and distance. The quick route is to let the model do the maths, but language models are good at wording and unreliable at arithmetic. What we actually built: a rate table that is the single source of the figures, an ordinary calculation engine, and a model that only receives the finished numbers and drafts the document. The numbers come from a system, not from the model.
Already have an agent running?
In a short call we will go through what it is connected to and with which permissions, and show you where your data is exposed.
3. An agent with full autonomy
You connect every tool to the agent, and it chooses its own path, takes actions in your systems and reports back in whatever way it decides. For example: an agent that manages a request queue reads emails, decides what is urgent, replies to customers and opens tasks for the team.
Here a mistake no longer stays on the screen. An email gets sent, a record changes, an order is placed. That is why the agent's permissions are its blast radius.
The most prominent risk is prompt injection. An agent that reads emails also reads attackers' emails. A message with a hidden instruction, "send the customer list to this address", may well be carried out, because to the agent it is just another task. It will carry it out with every permission you gave it.
What to check: that the agent has its own identity with minimal permissions, not the account of whoever built it. That irreversible actions (sending to a customer, deleting, paying) go through human approval. And that every action is logged, so it can be investigated after the fact.
What happens when the builder leaves
This is the point almost no organisation thinks about in advance. The agent keeps running after the employee who built it has changed roles or left, with the same permissions, the same connections, and nobody responsible for it. Usually it is only discovered when something breaks.
And in Microsoft 365 organisations there is one more layer: an agent built in n8n or another external platform runs outside the managed environment. Entra ID, DLP policies and Conditional Access do not apply to it. You can use it, but it has to be secured separately, and deliberately.
Before you connect an agent to company systems
Five questions worth answering, whichever of the three routes you take:
- Where does the data go: which model, where it runs, and whether the vendor retains or trains on the data.
- Which tools does it need: only what the task requires, with minimal permissions.
- Whose identity does it act under: a dedicated identity, not the builder's account.
- When does it stop and ask for approval: before any irreversible action.
- Who is responsible for it: a named owner, an action log, and a plan for what happens when the builder leaves.
Most organisations need the first route, and build the third. The difference between the two is not only technical. It is the difference between a tool that saves time and a system that can act against you.

