Questions tagged [session]

A session is token that is returned after successful authentication. This is used to identify legitimate user.

Filter by
Sorted by
Tagged with
0 votes
0 answers
37 views

All uses from PRODUCTION facing session time out issue and are getting logged out as soon as they login

We are facing an issue in production where all uses are getting this popup as soon as they login. Including salesforce administrators. Has anyone faced this issue today? NOTE: No change in session ...
user avatar
-1 votes
0 answers
14 views

Script or any way to change all my org Profile session time out time in session settings

Is there any way to create a script to change sessions setting to over 60 profiles in my org? I need to change the session time out option in profile session settings for all profiles (over 60). If ...
user avatar
0 votes
0 answers
38 views

Einstein Chat Bot timeout

I am working on a guided chatbot integrated into a public website. For some reason the bot is not getting timed out in 30 minutes which I understand should be the default behaviour. Instead the chat ...
user avatar
0 votes
0 answers
24 views

Save Custom logout url through Apex code

In Setup >> Security Controls >> Session Settings >> Logout Page Settings. System Admin can define Logout Page URL. Can we set this via Apex Code or Metadata API ?
user avatar
0 votes
1 answer
174 views

What is the difference between UserInfo session Id and Auth session Id?

I have come across these two ways to retrieve session Id in salesforce via Apex. I noticed Auth session Id not available in async or test classes but UserInfo session Id available all the time. ...
user avatar
1 vote
1 answer
69 views

Why values does not match for GETSESSIONID and getSessionId?

I am trying to read the user session using GETSESSIONID() on the VF page and using UserInfo.getSessionId() in apex. The values returned by both ways do not match. GETSESSIONID() => 00DAB000000I1zO!...
user avatar
0 votes
0 answers
18 views

can anyone help me how to solve Session error?

when I use vf page as a custom site then it will show me an error public class SessionController { public static String partitionInput = 'local.partitionA'; public Integer Sessionsecond{...
user avatar
2 votes
0 answers
97 views

Salesforce Frontdoor.jsp returns status 200 instead of 302 when behind firewall/VPN

The Salesforce CLI opens DX Scratch Orgs, Sandboxes, and Production environments by executing the force:org:open command. If you add the --urlonly flag to that command, it reveals the URL that is ...
user avatar
0 votes
0 answers
225 views

How to clear the sessionstorage on browser refresh in Aura component?

I am using sessionStorage.clear() to clear the sessionStorage in Init method, but this one is clearing after clicking 2 times on refresh button of the browser, is there a way we can clear after ...
user avatar
0 votes
0 answers
22 views

Connected App Policy not enforcing High Assurance session

I am using a third party service to query data from Salesforce. This third party service created and manages the Connected App Policy for this service. However, I have enabled High Assurance sessions ...
user avatar
0 votes
0 answers
69 views

Unable to disable XSS-Protection

I am trying to disable XSS-Protection for our SF Org (Community portal) as its deprecated. I disabled it under Session settings 'Enable XSS-Protection'. However I still see it, set to 1 mode=block ...
user avatar
  • 187
0 votes
0 answers
41 views

Logout functionality is not working properly in lightning component

I have designed a lightning component to log in to the partner portal. It's open the portal home page. Here I have different tabs. These tabs are getting called from events. A separate community page ...
user avatar
0 votes
1 answer
96 views

Auth Provider configured as High Assurance continues to prompt users for MFA?

Our users currently log into our org using their salesforce username and password credentials along with their registered verification method of choice for Salesforce's own MFA prompt. We're now in ...
user avatar
  • 2,564
-2 votes
1 answer
47 views

How Apex transactions work?

Part 1: We have a webpage without login(no session). On the webpage is a submit button when clicked creates a lead. It is integrated using heroku connect. When a user clicks submit a lead then a ...
user avatar
  • 101
1 vote
0 answers
38 views

bug in lightning screen , white screen after click on tab [closed]

hey when i click on the tab of custom object , sometime i receive a blank page . the page is a standard listview without any custom action from us . the problem seem to come from multiple network ...
user avatar
0 votes
1 answer
360 views

Is there a way to kill all active sessions when a user resets his password?

Scenario: If a User has logged in two browsers and if he reset password in one browser, the second browser session is still active. this will be a problem if an attacker gains access to my account and ...
user avatar
  • 191
3 votes
1 answer
134 views

Using Window.SessionStorage in product development cause any security vulnerability?

We're storing some encrypted text in the session Window.sessionStorage for community portal, just to avoid multiple server call backs for different navigations. Will it be flagged under any security ...
user avatar
1 vote
0 answers
65 views

On clicking on Vf page button getting logged out in safari browser

I have created a vf button for list view/Detail page. When I click on it I am redirected to login page. I tried some things but was not able to find reason for it. Then I tried session setting. I ...
user avatar
  • 3,299
1 vote
1 answer
130 views

How does an OATH2 session using the salesforce API get renewed? INVALID_SESSION_ID error after a certain time period

Had a question regarding session timeouts, renewals and renewing a security token using a connected app and the salesforce API. We have an Azure function that acts as a mediator to pass data between ...
user avatar
1 vote
2 answers
307 views

Capture session timeout event

We have a requirement, where salesforce is an identity provider for the external system(using SAML). So when a user logouts of salesforce, an external system should be notified. The connected app ...
user avatar
1 vote
1 answer
318 views

Deactivate "Session-Based Permission Sets" through Apex

Is there a way to deactivate "Session-Based Permission Sets" through Apex? We can activate it by creating a new instance of "SessionPermSetActivation" record in Apex, but I am ...
user avatar
1 vote
1 answer
464 views

Getting Community User's Ip Address via Apex

I'm trying to read Ip address of Logged in community user. I saw this question. It seems Session's ip address is empty for community user for some reason. SELECT Users.FirstName, SourceIp FROM ...
user avatar
0 votes
1 answer
604 views

How to add session cache in apex class to call

I have one method from which i am calling onother method which is having soql query. Every time method calls .Soql will get executed.to avoid any performance issue i have created session.catche code ...
user avatar
  • 1
0 votes
0 answers
245 views

How can I access a High Assurance Session in an Async Apex context?

Has anyone worked with a high assurance session requirement and async apex? I need to query the Security Health Check objects during an async process (the query happens in a queueable). If "View ...
user avatar
1 vote
2 answers
2k views

SFDX: How to log in by session id and session url

We are writing a nodejs application which should execute some set of actions against SF org triggered by incoming http request coming from that org. Such request will contain base url and session id ...
user avatar
  • 2,734
1 vote
0 answers
465 views

Enabling session setting "Lock sessions to the IP address from which they originated" and My Domain breaks PageReference.getContent()

After enabling My Domain and the "Lock sessions to the IP address from which they originated", calls to PageReference.getContent() fail with a 403 refused connection error. Is our only ...
user avatar
  • 351
0 votes
1 answer
447 views

Querying AuthSession with IsCurrent = TRUE only shows my user [duplicate]

While we may not be leading the pack in Salesforce adoption, I'm quite sure that a number of our 400 users are still logged in as If I look at session management in setup, there are plenty of UI ...
user avatar
  • 4,215
0 votes
1 answer
182 views

Lightning Out --- How to go around session persistence

We currently have an LWC component. It is targeted to be used in 3rd party sites. The best way to do this is via Lightning Out. We therefore created a lightning out application, it is currently ...
user avatar
  • 720
9 votes
1 answer
528 views

Can API access be limited to only via Apex classes?

We are building a product that offers two routes to the back-end data: JSON calls to @RestResource Apex class APIs LWC calls to @AuraEnabled Apex classes Is there a profile setup that keeps these ...
user avatar
  • 130k
1 vote
1 answer
65 views

Connected App Partner API requests failing with INSUFFICIENT_ACCESS fault code for specific profiles

I have a managed package that includes a connected app. After installation Subscribers add users to a permission set to access the connected app. When the users object the canvas app within the ...
user avatar
2 votes
0 answers
140 views

How to display profile picture on external website

I'm trying to display the profile picture on another website (photo url is something like https://c.na87.content.force.com/profilephoto/1234W000000ABCD/F. I have a sid token returned by oauth. There'...
user avatar
1 vote
1 answer
1k views

System.UserInfo.getSessionId() and metadata API

I am trying to do an API within my Salesforce to get the describe metadata, from winter 19 release notes and this idea that was marked as already delivered (Allow Apex to call Salesforce REST and SOAP ...
user avatar
  • 1,889
0 votes
1 answer
702 views

Access Token stopped working - Connection App problem - INVALID_SESSION_ID

I'm facing a problem with one of my Sandboxes. Today I noticed that Access Token received from Connected App doesn't work (Session expired or invalid - INVALID_SESSION_ID). It's weird because ...
user avatar
  • 1
4 votes
1 answer
451 views

Determine whether running user is logged in from within Trusted IP Range (from Apex)

I am creating a Login Flow that invokes Apex to do some processing, and need to determine whether the running (logging-in) user is connecting from an IP address whitelisted in our org's Trusted IP ...
user avatar
1 vote
1 answer
527 views

Bulk API V1 Query - ResultId missing when running concurrent Bulk Jobs

When querying for the result ids of a batch on a closed Bulk (v1) query job, sometimes the result id is not returned; instead the full returned xml is: <result-list xmlns="http://www.force.com/...
user avatar
  • 146
0 votes
0 answers
79 views

Make a Session using Apex code

I am wondering if there is any out-of-the-box functionality to make a Session for a specific User using Apex code. What I mean is this: I would create an Apex method, pass a UserID as a parameter, ...
user avatar
  • 685
1 vote
0 answers
153 views

Reload Visualforce page on session lost

Im trying to reload a Visualforce page when session is lost, due to another login, and sessionId created in a different browser tab. I have code that makes constant calls to the controller methods, ...
user avatar
2 votes
0 answers
387 views

Accessing Connected App From Visualforce

I'm developing an application which integrates with another services API. This API requires a SAML token to provide authentication. I've created a connected app, and from an execute anonymous call if ...
user avatar
  • 505
0 votes
1 answer
676 views

How to enforce session timeout in Native-iOS App

I am using SF Mobile SDK version 5.2. I am only using the sdk for authentication and authorization of SF users of our organization. Once a user is authenticated from the salesforce, he can use the app....
user avatar
  • 101
2 votes
1 answer
252 views

Collect codes for non-retail scenario

Can we use collect codes for non-retail scenarios especially if I wanted to track unknown visitor activity on my website and tie back that activity when a user provides an email on a sign-up page? (I ...
user avatar
1 vote
2 answers
466 views

How to get the Connected App used from an Apex trigger [duplicate]

I have an Apex Job that is being triggered from an 'afterInsert' trigger, but I don't want that Job to be executed if the insert is being performed by a specific external application. I just need to ...
user avatar
  • 21
0 votes
0 answers
102 views

Session timeout and session valid discrepancy

I have salesforce on a TV as a Dashboard and right now I'm having troubles with the session. I set my configuration for 24 hours timeout on Session Settings, for the whole org, but if I log and look ...
user avatar
10 votes
0 answers
299 views

Cache.Session not honoring ttlSecs argument?

I'm using session cache and trying to set the TTL (lifetime) to 60 minutes. However it is expiring much more quickly (it appears to be using the default 5 minute expiry). The docs say TTLs is ...
user avatar
  • 930
2 votes
1 answer
979 views

Keep SFDC Session alive

We have developed a web portal outside salesforce while using Salesforce as an identity provider. For the time being, we have some VF pages exposed within iFrames. Many of you know how these .. '...
user avatar
0 votes
1 answer
921 views

APEX making HTTP Request, and It fails

I'm trying to make an http request, with the UserInfo.getSessionID(), in the authorization value, to https://{{INSTANCE}}.salesforce.com/services/data/v43/ui-api/record-ui/{{sObjectID}} and It ...
user avatar
  • 313
0 votes
0 answers
178 views

Different SessionId [duplicate]

Is there a difference between {!$Api.Session_ID} on visualforce vs UserInfo.getsessionID() in Apex. I tried to print these 2 values on Visualforce page and see that both values are different. One ...
user avatar
  • 2,158
1 vote
2 answers
1k views

How to get remaining session time in Apex for current user

I have 2 questions: I know we can configure session timeout, but how can we get the configured session timeout value in Apex code? Does Salesforce provide helper function to calculate the remaining ...
user avatar
  • 13
2 votes
1 answer
918 views

Can I re-use a session ID outside of Salesforce?

I have an app that lives outside of salesforce on my own servers. I am going to link to it from within a different app that is already in Salesforce. Ideally I don't want the user to have to login ...
user avatar
3 votes
1 answer
2k views

INVALID_SESSION_ID when calling Salesforce services from Java

We have a Java application running on glassfish that makes callouts to WebServices hosted on our SF sandbox using the Partner WSDL and the SF Web Service Connector (wsc). Yesterday it was working ...
user avatar
4 votes
0 answers
816 views

Salesforce Bulk API v2.0 INVALID_SESSION_ID

Following the Salesforce Bulk API v2.0 documentation at: https://developer.salesforce.com/docs/atlas.en-us.api_bulk_v2.meta/api_bulk_v2/walkthrough_upload_data.htm https://developer.salesforce.com/...
user avatar
  • 203