Hello all -
I have a client that uses the Salesforce Mobile App. One of their users has been having daily issues searching in the mobile app and getting the error as seen here:
They solve it through a log out and log in. In my research travels I only see this error in the context of API integrations and nothing much on the mobile app.
Things I've investigated:
- API limits for the org
- login activity
- setup audit trail
- trust status
- Session Settings do not lock sessions to IP address or domain
I'm trying to understand what is causing this, but curious if this group has anything to share!
Thanks!
Jeff R.
Hi Jeff, since logging out and back in fixes it, the app is most likely holding an access token that Salesforce no longer accepts, and the silent refresh isn't working for that user. The mobile app talks to Salesforce through the REST API like any other OAuth client, which is why you only find this error in integration threads. Because it's one user and it happens daily, I'd look at what is different about that user's session rather than at the org:
- Profile session settings. A profile can override the org-wide session timeout (and other session settings). If this user's profile has a shorter timeout than everyone else's, the token will die every day.
- Connected app policies for Salesforce for iOS / Android. In Setup > Connected Apps OAuth Usage (or Manage Connected Apps), check the refresh token policy and any timeout value set on the app. Also check whether the app is set to admin-approved users only and the user's profile or permission sets still grant it.
- Login History for that user around the time of the error. Look for Remote Access 2.0 / refresh entries with a failed status, which usually tell you why the refresh was refused.
- Session Management in Setup. See if the user has a pile of sessions from several devices, or if something (a login flow, another admin, a security tool) is ending sessions on a schedule.
- Session security level. If any search result object or page requires a High Assurance session and the mobile session is Standard, access can be refused until a fresh login.
Quick test on the device side: have the user revoke the app under their personal settings (Connected Apps / OAuth), uninstall, reinstall and log in once. If the error stops for a while and then returns, it points to a policy or timeout. If it never returns, it was probably a stale token stored on that device.