Skip to main content

How to Resolve "Session Expired or Invalid" Error in Salesforce

As of Dec, 2024

Yuki Omori avatar
Written by Yuki Omori
Updated yesterday

📝 Overview

When integrating with Salesforce, you may encounter the following error:

"message": "Session expired or invalid","errorCode": "INVALID_SESSION_ID"

Below are the possible causes and solutions for this issue.


🔹 Cause 1: Session Settings in Salesforce

Session-related settings on the Salesforce side may trigger this error. Follow these steps to resolve it:

  1. Go to Session Settings and ensure the following options are unchecked:

    • Lock sessions to the IP address from which they originated

    • Force relogin after login as a user

    • Lock sessions to the domain in which they were first used

    • Force logout at session timeout under Session Timeout

  2. Under Manage Connected Apps > Yoom > Session Policies, set the timeout value to None.

  3. Under OAuth Policies, make sure Refresh token is valid until revoked is selected.

🔹 Cause 2: Existing Integration with Other Apps

Integrating Salesforce with other apps (e.g., Slack) could interfere with the connection. Check for any existing integrations and remove or update them as needed.

🔹 Cause 3: Linked Account Information Lost

If the connection to the Salesforce account is interrupted, the error may appear. To resolve this, try re-integrating Salesforce from My Apps.

📚 Related Guides

  • How to Fix the "Invalid Value for Restricted Picklist Field" Error in Salesforce - View Guide Here

  • How to Fix the "Requested resource does not exist" Error in Salesforce - View Guide Here

Search Keywords

Salesforce, error, session expired, INVALID_SESSION_ID

Did this answer your question?