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
0answers
25 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 ...
0
votes
0answers
19 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 ...
0
votes
1answer
24 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 ...
-2
votes
1answer
34 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 ...
1
vote
0answers
28 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 ...
0
votes
1answer
111 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 ...
3
votes
1answer
92 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 ...
0
votes
0answers
15 views

Unable to fetch latest Data from Session Partition

From community I'm taking the parameter from URL and storing in session cache. While storing and after storing I'm debugging the value and till here every thing is working fine. But when I try to get ...
1
vote
0answers
37 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 ...
1
vote
1answer
49 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 ...
0
votes
0answers
158 views

Session cache is only supported in Data Silo tests error while running test class

I have the following piece of code and whenever I am calling it from a test class it throws me an error public static void storeAssetMap(Map<ID,List<AssetLineItem>> assetMap, String ...
1
vote
2answers
150 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 ...
1
vote
1answer
159 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 ...
1
vote
1answer
239 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 ...
0
votes
1answer
195 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 ...
0
votes
0answers
161 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 ...
1
vote
2answers
932 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 ...
1
vote
0answers
307 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 ...
0
votes
1answer
236 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 ...
0
votes
1answer
103 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 ...
9
votes
1answer
444 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 ...
1
vote
1answer
38 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 ...
2
votes
0answers
98 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'...
1
vote
1answer
912 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 ...
0
votes
1answer
622 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 ...
4
votes
1answer
291 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 ...
1
vote
1answer
448 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/...
0
votes
0answers
53 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, ...
1
vote
0answers
121 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, ...
2
votes
0answers
338 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 ...
0
votes
1answer
564 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....
2
votes
1answer
207 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 ...
1
vote
2answers
350 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 ...
0
votes
0answers
96 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 ...
10
votes
0answers
244 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 ...
2
votes
1answer
729 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 .. '...
0
votes
1answer
837 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 ...
0
votes
0answers
169 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 ...
1
vote
2answers
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 ...
2
votes
1answer
723 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 ...
3
votes
1answer
1k 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 ...
4
votes
0answers
644 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/...
1
vote
1answer
22 views

need to avoid firing trigger on perticular api invocation

I have written one trigger which fires on account create and update,but there is one API which creates/update account and if creation/updation is through that API i don't need to fire trigger. Please ...
4
votes
1answer
352 views

Does the Platform Session Cache interpret multiple Site Guest User sessions separately?

I'm considering using a Platform Session Cache for User sessions on my force.com site. My question is: Does the Platform Session Cache interpret the "Force.com Site Guest User" as a single session, ...
2
votes
1answer
785 views

Removing password/session settings from profiles to allow org defaults to apply to all users

Has anyone managed to remove profile session/password settings to allow the org defaults to apply to all users? Can't seem to remove session timeout to "none" on the profile UI, it only allows you to ...
3
votes
1answer
239 views

Is session duration guaranteed?

Let's assume that our session timeout value is set to the default 2 hours. The documentation defines this value as Length of time after which the system logs out inactive users. If the user is ...
0
votes
0answers
106 views

Discerning a Production SessionId cookie from a Sandbox one

I'm trying to explore the browser's cookies and identify the Production SessionId. The thing is when i retrieved all the cookies filtered by sid, which is how they're called, I recieved over 30 (...
3
votes
1answer
4k views

Lock sessions to the IP address from which they originated

After enabling "Lock sessions to the IP address from which they originated" still able to login to workbench in same session and callouts are also working. Didn't understand the working of it.How does ...
4
votes
1answer
753 views

Post to Chatter via public REST resource on Force.com site

Per this Salesforce developer blog post, I am using a Force.com Site to publicly expose a REST web service: [...] add the class and any relevant objects/fields to your Site’s Public Access Settings,...
1
vote
2answers
4k views

How to Make Session Expire with Salesforce Connected App Web Server Flow

How would one make a session expire? Here is my configuration: Using a Salesforce Connected App Setup->Security Controls->Session Settings->Timout Value = 15 minutes Setup->Security Controls->...