ForceChallenges
ProblemsDailyNotesInterview
Sign in

Practice

All problemsSOQL practiceApex trigger challengesDaily challengeOpportunityTrigger.oldMapBefore UpdateBulkificationContactValidationGROUP BYSemi-JoinAccountBefore Insert

Interview questions

All questionsAdminAdministrationApexApex TriggerAsync ApexDevelopmentField ServiceField ServiceIntegrationLwc

By company

DeloitteSalesforceAccentureInfosysPwCCognizant

Learn

Study notes

ForceChallenges

AboutContact usPrivacy PolicyTerms of ServiceFor AI assistants (llms.txt)
© 2026 ForceChallenges · Salesforce SOQL & Apex trigger practice
Integration questions31 of 100
IntegrationMedium 2 min read

How do IP restrictions and Login IP Ranges secure Salesforce integration endpoints against unauthorized network access?

Answer

Basics: If an integration's credentials leak, an attacker outside your network could still use them. IP controls add a network condition: the credentials work only from approved addresses, such as your gateway or middleware egress IPs.

How it works:

  1. Profile Login IP Ranges (Setup > Profiles > Login IP Ranges): a login from an address outside the ranges is denied. They are set on profiles, not permission sets.
  2. Network Access trusted IP ranges (Setup > Network Access): logins from these addresses are not asked for an identity verification code. They do not block anything else.
  3. Connected app IP Relaxation: choose "Enforce IP restrictions" (the user's profile ranges apply), "Relax IP restrictions" (profile ranges bypassed for this app) or "Relax IP restrictions with second factor".
  4. Session Settings can lock sessions to the originating IP and, with "Enforce login IP ranges on every request", apply the ranges throughout the session rather than only at login.

Advanced / deep dive: Use a dedicated integration profile with login IP ranges for the integration's static egress addresses. Cloud middleware often has changing IPs, so use dedicated or static egress, a private network link, or mTLS and certificate auth instead of broad ranges. Login IP ranges work together with login hours and permission sets in a layered, least-privilege design. For outbound calls from Salesforce to your systems, allowlist Salesforce's published IP ranges on your firewall (verify, and note that ranges change and Hyperforce differs). IP restrictions do not replace OAuth scopes, MFA or field-level security.

Code / config example:

Profile: API Integration User
  Login IP Ranges:  203.0.113.10 - 203.0.113.20   (gateway egress)
Connected App > Manage > Edit Policies:
  Permitted Users: Admin approved users are pre-authorized
  IP Relaxation:   Enforce IP restrictions
Session Settings: [x] Enforce login IP ranges on every request
Practice SOQL & Apex
PreviousWhat audit and logging components constitute a robust enterprise integration monitoring framework?Next What are Platform Events and how do they enable event-driven architecture within Salesforce?

More Integration questions

  • How do PushTopics combine SOQL query criteria with real-time streaming notifications in Salesforce?
  • How do webhook security mechanisms verify the authenticity of incoming HTTP notifications from external systems?
  • How do federated identity and SAML single sign-on streamline authentication across enterprise integration landscapes?
  • How do CORS settings permit authorized web applications to perform cross-origin REST requests against Salesforce?
  • How do rate limiting and throttling mechanisms protect Salesforce endpoints from excessive traffic spikes?

Hidden gotchas & must-remember points:

  • Trusted IP ranges are not a blocklist. Only Login IP Ranges deny access.
  • Login IP ranges live on profiles, so permission sets cannot add them.
  • "Relax IP restrictions" on a connected app can silently remove your profile protection.
  • A wrong range locks out the integration, so test in a sandbox and keep an admin recovery path.
  • Shared cloud IPs make narrow ranges unreliable.
  • Username-password OAuth flows without a trusted IP may need a security token.

Best practice: Use a dedicated integration profile with the narrowest static IP range, and add certificate-based authentication rather than relying on IPs alone.

IntegrationIP RestrictionsNetwork Security