# How AI agents can work safely with ERP and CRM systems

Give each agent a scoped user, let the ERP or CRM enforce access, keep segregation of duties, require approval for high-impact writes and log every change.

## Key takeaways

- An AI agent that writes to an ERP or CRM should act as a user the system recognizes, either its own scoped agent user or the invoking person narrowed to the agent's scope, never a shared administrator account.
- Authorization belongs in the ERP or CRM, not in the agent's prompt. The system of record should check every request the agent makes against its own roles and sharing rules.
- Segregation of duties applies to agents. An agent should not hold both sides of a conflicting pair of duties, such as receiving goods and paying the vendor, and whoever configures an agent should not also approve its output.
- Writes from an agent need the same safeguards as any integration, including idempotency keys so retries do not create duplicates and concurrency checks so the agent does not overwrite a newer change.
- Test agents in a sandbox copy of the system with masked data, and turn on field-level audit history so every change the agent makes can be traced to it.

AI agents can work safely with ERP and CRM systems when they are treated like any other privileged user of a system of record. Give each agent a user the system recognizes, scoped to the objects and actions its task needs, and let the ERP or CRM enforce access on every request. Keep segregation of duties, require a person to approve high-impact writes such as payments and postings, make every write safe to retry, and keep field-level audit history so each change can be traced to the agent that made it.

## Why are systems of record a harder case for agents?

In a system of record, the agent's output is the record itself. A wrong field in a CRM or a duplicate posting in an ERP becomes the data other teams, reports and auditors rely on. Financial records also sit under internal controls that were designed for people and conventional software.

COSO, which publishes the Internal Control – Integrated Framework, has issued guidance on generative AI that warns AI-driven workflows can create "the potential for policy misapplication and hidden SoD conflicts if changes are not well governed."[^coso-genai] Joint guidance on agentic AI from the cyber security agencies of Australia, Canada, New Zealand, the UK and the US (the Five Eyes) describes a scenario where an agent was given broad access to "financial systems, email and contract repositories," so that an attacker who compromised a tool in its workflow could "modify contracts and approve payments without triggering alerts."[^five-eyes]

The controls below come from that starting point. Most are controls you already apply to people and integrations. The work is applying them to agents deliberately.

## Whose identity should the agent use?

Use an identity the system of record can check and log, and do not let the agent borrow a shared or administrator account. The main platforms offer two patterns, and the choice decides whose permissions apply.

| Platform                                                                                                  | Whose identity and permissions apply                                                                                                                                                                     |
| --------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Salesforce Agentforce                                                                                     | Employee agents run under "the logged-in user's execution context."[^sf-exec] Service agents that cannot use the end user's record use "a dedicated user record," called the agent user.[^sf-agent-user] |
| Microsoft Dataverse (MCP server)                                                                          | The calling user's. The server "respects Dataverse security roles and row-level security," so users reach only the tables and records their role permits.[^dataverse-mcp]                                |
| SAP Cloud Identity Services (agent identities, in an Early Adopter Care program, not generally available) | Agents "always act on behalf of a human user," and an action succeeds "only when both the agent's scope and the user's permissions allow it."[^sap-agents]                                               |
| ServiceNow AI agents                                                                                      | By default an agent runs as a dynamic user with the invoking user's roles; an AI user has its own roles, and "every invocation reads and writes with the AI user's roles."[^servicenow-ai-user]          |

Two rules follow.

1. **When the agent acts for a person, narrow that person's access, do not replace it.** The model SAP describes for its agent identities, still in an Early Adopter Care program, where the agent's own scope and the user's permissions must both allow an action, is the pattern to aim for, whatever platform you use.[^sap-agents] ServiceNow takes a similar approach for agents that run as the invoking user, letting admins select the approved roles the agent runs with "to limit the data access that an AI agent could have."[^servicenow-ai-user] OWASP recommends that actions taken for a user run "in the context of that specific user, and with the minimum privileges necessary."[^owasp-llm06]
2. **When the agent acts on its own, give it a dedicated user with its own minimal grants.** Salesforce's guidance is that a new agent user created for a customer-facing agent "starts with minimal access" and that you "manually grant only the specific permissions required."[^sf-shared] A dedicated user also makes every change attributable to the agent in the system's own history.

For the identity side in more depth, including delegation and short-lived credentials, see [how to give AI agents identities and permissions](/guides/ai-agent-identity-and-permissions/).

## How narrow should an agent's access be?

As narrow as the task, enforced by the ERP or CRM rather than the agent. OWASP's guidance on excessive agency is to "implement authorization in downstream systems rather than relying on an LLM to decide if an action is allowed or not," so that all requests are "validated against security policies."[^owasp-llm06]

The OWASP Top 10 for Agentic Applications gives two examples of what goes wrong without this: a Salesforce tool that "can get any record even though only the Opportunity object is required," and a customer service bot meant to fetch order history that "also issues refunds because the tool had full financial API access."[^owasp-agentic] In practice:

- Grant access to the specific objects, fields and record sets the task needs, through the platform's roles, permission sets and sharing rules.
- Expose specific actions, not general-purpose APIs. Salesforce advises limiting an agent "to only execute pre-defined, approved actions, such as specific Salesforce Flows, Apex classes, or API calls."[^sf-shared]
- Separate reading from writing. An agent that answers questions about accounts does not need the permission to change them.

## Does segregation of duties apply to AI agents?

Yes. Segregation of duties is "a basic internal control that prevents or detects errors and irregularities" by giving separate individuals responsibility for initiating and recording transactions and for the custody of assets.[^isaca] NIST puts the principle simply: "no user should be given enough privileges to misuse the system on their own."[^nist-sod] An agent user is a user for this purpose.

Microsoft's ERP documentation gives a standard example of a conflict, where "you might not want the same person to acknowledge the receipt of goods and to process payment to the vendor."[^d365-sod] Run each agent user's role assignments through the same segregation-of-duties rules as people's, so an assignment that breaks a rule is caught. In Dynamics 365 Finance, for example, a role assignment that violates a rule is logged as a conflict for the administrator to resolve.[^d365-conflicts]

Agents add one more conflict to watch for. COSO's generative AI guidance recommends that you "separate the ability to configure AI settings from the authority to approve or review outputs."[^coso-genai] The person who writes an agent's prompt, rules or thresholds should not also be the person who signs off on what it produces.

## Which actions need a person's approval?

Any action that is high-impact or hard to reverse. The Five Eyes guidance says to "prevent agents from autonomously executing high impact actions or outputs without prior human approval," and to make sure the decision about when approval is required is "determined by system designers or operators, not delegated to the agentic AI system."[^five-eyes] OWASP gives delete, transfer and publish as examples of actions that need "human confirmation."[^owasp-agentic]

For ERP and CRM work, that usually means payments, journal postings above a threshold, changes to vendor bank details, credit limits, pricing, contract terms, and bulk updates or deletions.

Approval does not have to mean a person checks everything. COSO describes a reconciliation agent "configured to automatically post only when the match confidence exceeds a validated threshold and no policy exceptions are triggered," with everything else routed to a queue for human review.[^coso-genai] The threshold, the checks and the queue are set by people and enforced outside the agent.

## How do you make agent writes safe?

Treat each write as an integration call that can fail halfway, be retried, or race with someone else's change.

- **Make writes idempotent.** A request that times out may still have succeeded, and repeating it "can result in duplication or incorrect updates."[^ietf-idempotency] Stripe's API, for example, asks clients to send an idempotency key so that after a connection error "you can safely repeat the request without risk of creating a second object or performing the update twice."[^stripe] Where your ERP or CRM supports an equivalent, such as an external ID or an upsert keyed on a business identifier, have the agent use it.
- **Check for concurrent changes.** The HTTP If-Match header is used to prevent the "lost update" problem when several clients act on the same resource.[^rfc9110] On supported tables, Dataverse's optimistic concurrency lets an application detect whether a record "changed on the server in the time between when your application retrieved the record and when it tries to update or delete that record."[^dataverse-concurrency] An agent that reads a record, reasons for a while and then writes is exactly the case this guards against.
- **Respect the system's limits.** Salesforce enforces API limits "against the aggregate of all API calls made to the org in a 24-hour period," not per user.[^sf-api-limits] Dataverse limits apply per user, and its Web API returns a 429 error with a Retry-After header when one is reached.[^dataverse-limits] A looping agent can exhaust an allocation that other integrations depend on, so give it its own budget and make it back off when told to.

## How do you test agents against a system of record?

In a sandbox copy, with production data masked. Salesforce sandboxes "create copies of your Salesforce org in separate environments" for development and testing "without compromising the data and applications in your production org."[^sf-sandbox] For the wider path from pilot to production, see [how to take an AI agent from prototype to production](/guides/ai-agents-prototype-to-production/). Copying production brings real personal data with it, so mask it. Salesforce's Data Mask & Seed, an add-on, replaces personal data in sandboxes "with realistic synthetic data."[^sf-data-mask] The Five Eyes guidance also recommends sandbox environments "to test agent behaviour before production deployment."[^five-eyes]

Test the failure cases as well as the happy path: a timeout followed by a retry, a record changed between read and write, a request the agent's user is not allowed to make, and an action that should go to the approval queue.

## How do you keep a record of what the agent changed?

Turn on the system's own audit history for the objects the agent writes, and make sure the agent's changes are attributed to it. Dataverse auditing, once turned on for an environment and its tables, records "Who created or updated a record and when," which fields changed, and the previous values.[^dataverse-audit] Salesforce field history entries "include the date, time, nature of the change, and who made the change," for the fields you choose to track. Salesforce keeps that history for up to 18 months, or 24 months through the API, unless Field Audit Trail is turned on.[^sf-field-history]

That history names the agent only if the agent has its own user, or if the delegation behind each change is recorded somewhere you can join to it. COSO's guidance for unattended bots sets the bar: their activities should be "retraceable and can be reproduced in an (Internal) Audit."[^coso-rpa] For the wider governance program around this record, see [how to govern AI agents in production](/guides/how-to-govern-ai-agents/).

## Where Sycamore fits

[Sycamore Build](/build/) builds agentic software around the systems of record a business already trusts. It connects to the CRM, documents, data platforms, ticketing and communication systems through approved connectors, APIs and MCP tools, respecting the organization's identity, permissions and data boundaries, and builds the missing interface, decisions and orchestration around them. Approved versions move through preview, development and production with environment-specific access and deployment history. [Sycamore Govern](/govern/) gives every agent an identity with model, tool and data access routed through policy, bounds high-impact actions with approval gates, and keeps a tamper-evident record of approvals, policy checks, access, changes and revocations.

[^coso-genai]: COSO, "Achieving Effective Internal Control Over Generative AI (GenAI)" (2026), https://www.coso.org/_files/ugd/719ba0_08f358f2c8f946fa9d26bd51d37b7117.pdf

[^five-eyes]: ASD's ACSC, CISA, NSA, Canadian Centre for Cyber Security, NCSC-NZ and NCSC-UK, "Careful adoption of agentic AI services" (2026), https://www.ncsc.govt.nz/assets/guidance/Documents/Careful-adoption-of-agentic-AI-services_FINAL.pdf

[^sf-exec]: Salesforce, "Agent Execution Context and Data Access by Type", Salesforce Help, https://help.salesforce.com/s/articleView?language=en_US&id=ai.agent_execution_data.htm&type=5

[^sf-agent-user]: Salesforce, "Configure Service Agent Access", Salesforce Help, https://help.salesforce.com/s/articleView?language=en_US&id=ai.agent_user.htm&type=5

[^dataverse-mcp]: Microsoft Learn, "Connect to Dataverse with model context protocol FAQ", https://learn.microsoft.com/en-us/power-apps/maker/data-platform/data-platform-mcp-faq

[^sap-agents]: SAP, "Agents", SAP Cloud Identity Services documentation, https://help.sap.com/docs/cloud-identity-services/cloud-identity-services/agents

[^servicenow-ai-user]: ServiceNow, "Define access rules for an AI agent", ServiceNow product documentation, https://www.servicenow.com/docs/r/intelligent-experiences/define-sec-aia-new.html

[^owasp-llm06]: OWASP GenAI Security Project, "LLM06:2025 Excessive Agency", https://genai.owasp.org/llmrisk/llm062025-excessive-agency/

[^sf-shared]: Salesforce, "Agentforce Security and the Shared Responsibility Model", Salesforce Help, https://help.salesforce.com/s/articleView?id=005315874&language=en_US&type=1

[^owasp-agentic]: OWASP GenAI Security Project, "OWASP Top 10 for Agentic Applications for 2026" (ASI02 Tool Misuse and Exploitation), https://genai.owasp.org/resource/owasp-top-10-for-agentic-applications-for-2026/

[^isaca]: ISACA, "Interactive Glossary", segregation/separation of duties, https://www.isaca.org/resources/glossary

[^nist-sod]: NIST Computer Security Resource Center, "Separation of Duty (SOD)", glossary, https://csrc.nist.gov/glossary/term/separation_of_duty

[^d365-sod]: Microsoft Learn, "Set up segregation of duties", Dynamics 365 Finance and Operations, https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/fin-ops/sysadmin/set-up-segregation-duties

[^d365-conflicts]: Microsoft Learn, "Identify and resolve conflicts in segregation of duties", https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/fin-ops/sysadmin/identify-resolve-conflicts-segregation-duties

[^ietf-idempotency]: IETF HTTPAPI Working Group, "The Idempotency-Key HTTP Header Field" (Internet-Draft, work in progress), https://datatracker.ietf.org/doc/draft-ietf-httpapi-idempotency-key-header/

[^stripe]: Stripe, "Idempotent requests", Stripe API Reference, https://docs.stripe.com/api/idempotent_requests

[^rfc9110]: IETF, "RFC 9110: HTTP Semantics", section 13.1.1 If-Match, https://www.rfc-editor.org/rfc/rfc9110.html

[^dataverse-concurrency]: Microsoft Learn, "Optimistic concurrency", Microsoft Dataverse, https://learn.microsoft.com/en-us/power-apps/developer/data-platform/optimistic-concurrency

[^sf-api-limits]: Salesforce, "API Request Limits and Allocations", Salesforce Developer Limits and Allocations Quick Reference, https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_api.htm

[^dataverse-limits]: Microsoft Learn, "Service protection API limits", Microsoft Dataverse, https://learn.microsoft.com/en-us/power-apps/developer/data-platform/api-limits

[^sf-sandbox]: Salesforce, "Sandboxes: Staging Environments for Customizing and Testing", Salesforce Help, https://help.salesforce.com/s/articleView?language=en_US&id=platform.deploy_sandboxes_parent.htm&type=5

[^sf-data-mask]: Salesforce, "Protect Sensitive Data with Data Mask & Seed", Salesforce Help, https://help.salesforce.com/s/articleView?language=en_US&id=platform.data_mask_and_seed.htm&type=5

[^dataverse-audit]: Microsoft Learn, "Manage Dataverse auditing", https://learn.microsoft.com/en-us/power-platform/admin/manage-dataverse-auditing

[^sf-field-history]: Salesforce, "Field History Tracking Overview", Salesforce Help, https://help.salesforce.com/s/articleView?language=en_US&id=sf.tracking_field_history.htm&type=5

[^coso-rpa]: COSO, "Achieving Effective Internal Control Over Robotic Process Automation" (2024), https://www.coso.org/_files/ugd/719ba0_8b22177f8521488687a838c680c54f59.pdf

## Frequently asked questions

### Should an agent post directly to the ERP or go through a review queue?

Start with a queue for anything that changes financial records, and let the agent post directly only where a rule decides it safely. A common pattern is to let the agent post items that meet a validated threshold and pass every policy check, and route the rest to a person with the context needed to decide. Widen the direct path only after the queue shows the agent's proposals are reliably right.

### Can an agent reuse the account of an existing integration or RPA bot?

It should not. That account carries whatever the integration was granted, which is rarely what the agent needs, and the audit trail would show the integration rather than the agent. Create a separate user for the agent, grant it only the objects and actions its task requires, and add it to your segregation-of-duties rule set like any other user.

### Does an agent that only reads from the CRM need the same controls?

Fewer, but not none. A read-only agent cannot corrupt records, but it can expose data its users should not see, and it can still use up API limits shared with other integrations. Give it its own user scoped to the objects and fields it needs, enforce the asking person's sharing rules when it answers on their behalf, and monitor its call volume.

### What about agents that a software vendor runs inside our CRM?

Apply the same rules through the controls the vendor gives you. Find out which user the agent runs as and what it can read and write, restrict it with your own roles and sharing rules, and include it in your segregation-of-duties checks and audit history. Ask the vendor how the agent's access is revoked and what it logs, and record the agent and its owner in your inventory.

Published November 14, 2026 by Sycamore.