Integration users and API security
Dedicated integration users with API-only access and least privilege, the Salesforce Integration licence, app policies, IP restrictions, token lifetimes, certificate rotation and monitoring.
Simple explanation
Every integration should authenticate as its own dedicated user, never as a person.
Integration user design
- One user per integration (or per system), so access and activity can be traced and revoked independently.
- The Salesforce Integration user licence with an API-only profile is designed for this; Enterprise, Unlimited and higher editions include a small number of these licences β verify count.
- Least privilege through permission sets: only the objects, fields and system permissions the integration needs. Avoid Modify All Data and View All Data.
- API Only User permission: cannot log in to the UI.
App and token controls (External Client Apps)
- Permitted users: admin-approved, pre-authorised through a permission set.
- OAuth scopes: the minimum, for example
apiwithoutfullorrefresh_tokenunless needed. - IP restrictions on the app or user where the integration has fixed IPs.
- Token lifetimes and refresh token policies (expire if unused, rotate).
- Certificates for JWT bearer with an expiry calendar and rotation runbook.
Monitoring: API usage per user, login history for failed logins, Event Monitoring (API events), and alerts for unusual volume or new IPs.
Real-world analogy
An integration user is a service vehicle with its own licence plate. You know exactly which deliveries it made, you can revoke its permit without affecting staff, and it's only allowed into the loading bay (least privilege), not the executive floor.
Worked example
ERP middleware integration:
- User
integration.erp@acme.examplewith the Salesforce Integration licence, API-only profile, and permission set ERP Integration (read/write Account, Order, Order Item; read Product; specific fields only). - External Client App with JWT bearer,
apiscope only, admin-approved users, IP restriction to the middleware's egress IPs. - Certificate valid for 12 months, rotation scheduled at 11 months with overlap.
- Dashboard of API calls per integration user; alert if daily calls exceed the expected range or logins fail repeatedly.
Diagram
Key points
- One dedicated user per integration, never a person's account.
- Salesforce Integration licence, API-only profile, least-privilege permission sets.
- Minimal scopes, admin-approved access, IP restrictions.
- Token lifetimes, refresh policies, certificate rotation runbook.
- Monitor API usage and failures per integration user.
- Avoid Modify All Data; justify every system permission.
Limits and gotchas
- A shared integration user for several systems makes revocation and auditing impossible without breaking everything.
- Integration users that own records can cause ownership skew and sharing performance issues; assign ownership deliberately.
- Expired certificates cause sudden outages; track them.
- Integration users still count toward API allocations; a runaway client can exhaust the org's daily limit.
π€ How to say this in an interview
Interviewers often ask "how do you secure an integration?". Answer with the user, the app, the token and the monitoring, in that order, and mention least privilege and certificate rotation explicitly.
Common follow-ups
Why not use a system administrator account for integrations?
It gives far more access than needed (a breach exposes everything), mixes human and system activity in audit trails, and breaks the integration whenever the admin's password, MFA or employment changes.
What do you do when an integration's credentials may be compromised?
Revoke its tokens and disable the user or app access immediately, rotate the certificate or secret, review Event Monitoring and login history for misuse, then re-establish access with new credentials.