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
1 answer
25 views

Inquiry Regarding Salesforce Integration License Session Expiry

I am looking to set up a profile using the Salesforce Integration license and would like to establish a session expiration time for this profile. My question is as follows: Considering that the ...
aeonyet's user avatar
  • 11
0 votes
2 answers
55 views

Avoid sending multiple requests HTTP

When I click a button I send a request to another server, I have to wait for the server's response on the other side (may take 40 seconds) I disabled the button to avoid multiple clicks, but when we ...
Vneq's user avatar
  • 79
0 votes
0 answers
57 views

session id is not set in request header while requesting a domain url

I have url https://es-portal.gavi.org/sdgavi--uat/sdcs101/ in custom settings while redirecting to the url session id is not set in the cookie for that it always redirecting to login page..From ...
Leo's user avatar
  • 1
0 votes
0 answers
37 views

Can a user logged in to one org be moved to a logged in session in another org?

This question relates to a situation where some data is not replicated across the orgs making moving the user's interactive session between the orgs seem like a possible approach. The UI is a Digital ...
Keith C's user avatar
  • 135k
0 votes
0 answers
20 views

Connected App using JWT session expires after 2 hours [duplicate]

I'm deploying a web application that makes a request to the salesforce API, I'm using JWT and a connected app to connect my web application to Salesforce. The thing is after two hours, as it shows on ...
Tom's user avatar
  • 1
0 votes
0 answers
44 views

Is Seamless SSO with Salesforce as IdP possible?

We have SSO with multiple partner vendors but still have the situation where logging in to one SSO OAuth app does not get you into the others (though it will also get you into our SF community portal)....
dwirth's user avatar
  • 17
1 vote
1 answer
391 views

Update Toggle Switch from js handler LWC

I've an Input toggle field which needs to be updated from sessionstorage. <lightning-input data-id="toggle1" type="toggle" onchange={changeToggle} label="Record Exists"...
Anurag's user avatar
  • 2,206
2 votes
1 answer
986 views

Visualforce.Remoting returns "Remoting request authorization expired. Refresh the page and try again"

I have an issue with Visualforce Remoting. The issue presents it self, when my visualforce page executes a remote call to the related custom apex controller. I can see the browser console log the ...
Andreas86's user avatar
  • 347
1 vote
0 answers
121 views

How to connect local Angular with Scratch org

I am working on an integration between a Portal written in Angular and a Salesforce Org. To better test this during development I want to connect my local Angular code with my scratch org. To receive ...
Natalia Popova's user avatar
0 votes
0 answers
73 views

Error on previously visited page

im having this kind of error. I want my page to redirect to the last valid page it goes to instead of Account-Show. For example, when I click on a product and I decide to Log-in, after successfully ...
exekiel vergara's user avatar
2 votes
1 answer
3k views

Impact of Session Setting 'Lock Sessions to the domain first used'

We Are looking to enable the Session Setting -> 'Lock Sessions to the domain first used'. Unlike the other setting where we can restrict user to the original IP address, i am little concerned with ...
Chellappa Karimanoor's user avatar
2 votes
0 answers
166 views

Connected App Using Server To Server JWT OAuth Can Only Have One Session At A Time

I have a connected app that I authenticate to from multiple servers using the same IP in my data center. (This Salesforce org is setup to only allow IPs in the allowlist - which ours is in.) The first ...
Adam's user avatar
  • 121
0 votes
0 answers
937 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 ...
starhunter's user avatar
0 votes
0 answers
147 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 ?
Ashish Narang's user avatar
2 votes
1 answer
4k 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. ...
Satishakumar Awati's user avatar
1 vote
1 answer
456 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!...
Satishakumar Awati's user avatar
2 votes
0 answers
354 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 ...
ImJohnMDaniel's user avatar
0 votes
0 answers
1k 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
1 answer
260 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 ...
Jan Julian's user avatar
  • 2,614
-2 votes
1 answer
161 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 ...
user61140's user avatar
1 vote
0 answers
160 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 ...
Acher Klein's user avatar
0 votes
1 answer
1k 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 ...
Veera G's user avatar
  • 191
3 votes
1 answer
353 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 ...
Yaswanth Tikkisetti's user avatar
1 vote
0 answers
112 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 ...
Manjot Singh's user avatar
  • 3,406
1 vote
1 answer
541 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 ...
user1299379's user avatar
1 vote
2 answers
783 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 ...
Ranjit P's user avatar
1 vote
1 answer
655 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 ...
Sidharth Agarwal's user avatar
1 vote
1 answer
1k 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 ...
Pasan Eeriyagama's user avatar
0 votes
1 answer
2k 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 ...
sandy's user avatar
  • 1
0 votes
0 answers
438 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 ...
Toby Curtis's user avatar
1 vote
2 answers
3k 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 ...
wesaw's user avatar
  • 2,990
1 vote
0 answers
890 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 ...
user4978's user avatar
  • 349
0 votes
1 answer
1k 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 ...
gorav's user avatar
  • 4,485
1 vote
1 answer
374 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 ...
SamuelDev's user avatar
  • 780
9 votes
1 answer
753 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 ...
Keith C's user avatar
  • 135k
1 vote
1 answer
109 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 ...
Daniel Ballinger's user avatar
2 votes
0 answers
234 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'...
Bart Juriewicz's user avatar
2 votes
1 answer
2k 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 ...
manza's user avatar
  • 1,945
0 votes
1 answer
927 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 ...
Lyroys's user avatar
  • 1
4 votes
1 answer
568 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 ...
Brent Bowers's user avatar
  • 3,074
1 vote
1 answer
736 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/...
joynoele's user avatar
  • 146
0 votes
0 answers
303 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, ...
vt89's user avatar
  • 725
1 vote
0 answers
235 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, ...
Sebastian's user avatar
2 votes
0 answers
422 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 ...
Kenji776's user avatar
  • 517
0 votes
1 answer
1k 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....
HAK's user avatar
  • 101
2 votes
1 answer
296 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 ...
Chandu Sarkar's user avatar
1 vote
2 answers
790 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 ...
Laura's user avatar
  • 21
0 votes
0 answers
268 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 ...
Tomás Kroth's user avatar
11 votes
0 answers
469 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 ...
Shanerk's user avatar
  • 1,042
2 votes
1 answer
1k 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 .. '...
Jos Vervoorn's user avatar