Loading

Salesforce Platform: Developer Console Access with API Access Control Enabled

Publiceringsdatum: Mar 25, 2026
Beskrivning

Why This Error Occurs

When API (Application Programming Interface) Access Control is enabled in your Salesforce org, users may encounter the error "This session is not valid for use with the REST (Representational State Transfer) API" when trying to access the Developer Console. The Developer Console is a web-based integrated development environment (IDE) in Salesforce used to write, debug, and test Apex code and queries.

This error occurs because if a user is assigned the system permission "Use Any API Client" only through a Session-Based Permission Set (a permission set that grants additional access only after a specific login condition is met, such as multi-factor authentication), the permission is not activated during session initialization.

Impact

- The Developer Console cannot be accessed.
- Users receive the error: "This session is not valid for use with the REST API."

Example Scenario

A developer needs to debug code in the Developer Console but has the "Use Any API Client" permission granted only through a Session-Based Permission Set. When they try to open the Developer Console, the session does not recognize the permission, resulting in the REST API error.

For more information about Session-Based Permission Sets, refer to Salesforce Help: Use Session-Based Permission Sets.

Lösning

How to Fix This Issue

To resolve this error and enable Developer Console access, assign the "Use Any API Client" permission using one of the following methods:

Option 1: Assign via a Standard Permission Set

Option 2: Assign via the User Profile

Navigate to Setup > Permission Sets.
Select the relevant permission set (or create a new one).
Click System Permissions.
Enable "Use Any API Client."
Click Save.
Assign the permission set to the affected user.
Navigate to Setup > Profiles.
Select the profile assigned to the affected user.
Under System Permissions, enable "Use Any API Client."
Click Save.

Important: Avoid relying solely on Session-Based Permission Sets for the "Use Any API Client" permission. Session-Based Permission Sets are not activated during the session initialization required by the Developer Console, which is the root cause of this error.

Ytterligare resurser

Additional Resources-

Note: This is a known limitation of the Developer Console with Session-Based Permission Sets. Salesforce is investigating this issue and will update the documentation if enhancements occur.

Knowledge-artikelnummer

005132451

 
Laddar
Salesforce Help | Article