Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [session]

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

0
votes
1answer
21 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
31 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
28 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
22 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 ...
8
votes
0answers
79 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 ...
0
votes
1answer
35 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
77 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
25 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 ...
0
votes
2answers
89 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
40 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 ...
2
votes
1answer
56 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 ...
3
votes
0answers
93 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
21 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
63 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, ...
1
vote
1answer
53 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
53 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
44 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 (...
0
votes
0answers
62 views

Salesforce Internal error : Invalid Session

Salesforce internal error : invalid session Getting this error on VBA code for connecting to Salesforce. Error on --- Set RSO = SFConn.Query("select " & Fields_list & " from Contact where ...
2
votes
1answer
639 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
146 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,...
0
votes
2answers
717 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->...
0
votes
1answer
79 views

Can Session (API) timeout greater than 2 hours?

Is there any harm if we configure Session timeout to 12 or 24 hour period when integrating SF with the external systems
0
votes
1answer
84 views

Session API validity

We have currently configured Session timeout as 2 hours on the API User Profile. Our Org. is connected to a .net application using these API User credentials. Say connection is established ...
0
votes
0answers
155 views

SOAP Call From Apex: INVALID SESSION ID

If you could see me right now, you'd see my hands in the air - because I've thrown them up over this issue I'm having. I was tasked with creating a VisualForce settings page for certain profiles to ...
0
votes
0answers
240 views

Soap API Session ID expiration

we are integrating Salesforce with an external system through Salesforce SOAP API. The login() call which return the session ID is working but the sessionID returned expires with random timing The ...
1
vote
0answers
299 views

Iframe with Windows Authentication in Internet Explorer

Having some real problems getting a Visualforce page to work with Internet Explorer 11. I have the following Visualforce Page: <apex:page controller="MyController"> <iframe frameborder=...
3
votes
1answer
215 views

How to expire our access token for testing?

As mentioned here, the "Session timeout" setting specifies the lifetime of our access token. However, when I set it up to timeout after 15min, it does not seem to happen. Also, the response we get ...
1
vote
0answers
26 views

Getting error “No session Id received from SFDC”. Does anything changed in Spring/Winter releases?

We have integrated SAP and Salesforce system where customer data is being pushed from SAP to Salesforce. We have used Bulk API for this purpose. The issue is, the Bulk API throws the error below, ...
0
votes
1answer
19 views

Identifying multiple requests from force.com sites (without Authentication)

I have built a REST API client to a third party application and I am exposing the VF page to everyone in my org without having them to login to my salesforce application. I need to maintain a session ...
0
votes
1answer
17 views

Using a flow to log a user out of their session

Is there a declarative way to log a user out of their session using a flow, or is a Visualforce page the only way to go about it?
4
votes
0answers
849 views

REST API using SessionId throws “not valid for use with the REST API” for Community users

Following are the steps I am doing: Get the Salesforce Session ID through SAML Handshake using SAML attributes Trigger REST API using that session ID curl https://my-communities.force.com/...
0
votes
2answers
325 views

INVALID_SESSION_ID error when external app is calling GETmethod on salesforce

I have created webservice class with Get method. I have created Connected app and I have consumer key and consumer secret.But I don't have knowledge on how to use it. When external app is calling ...
1
vote
0answers
72 views

Setting Session-Based Permissions via Connected App

Here's my use case: We have API-only users who authenticate using the OAuth 2 web server flow and access SF via a ConnectedApp . At the time of auth / refresh, we want to activate a session-based ...
0
votes
1answer
169 views

How to handle the page you submitted was invalid for your session errors in visualforce?

Is there a way to identify The page you submitted was invalid for your session errors in visualforce page or controller? I currently have an error handler page, which will notify users to try again ...
1
vote
1answer
207 views

Persisting OAuth Token in Apex

So I've been working to persist a logged-in Users session without the user having to log back in. This would be done with the "OAuth 2.0 Refresh Token Flow". However, I'm having trouble mapping out ...
0
votes
0answers
91 views

AuthSession expiration

I have problem with expiration time. In Setup -> Security Control -> Timeout value is 15 minutes (900 seconds). The same value on user profile level. But when I do SOQL query I have sessions with ...
2
votes
1answer
103 views

Is it possible to keep an external user (community user) logged in indefinitely?

I have a connected app that is using Salesforce Communities to provide Salesforce support for my app. I'd like to have the users not get logged out at all. The highest setting is "Session times out ...
1
vote
1answer
313 views

Active session in Lightning component

How can I check in my lightning component if a session is valid? Can I do this using only my javascript controller on the doInit or do I need to code in my apex controller?
1
vote
1answer
827 views

Cache.Session return null value

I have create small function to store and retrieve the value inside static using session cache. but i am unable to get the data which i have stored in session cache. I am not getting any error on ...
0
votes
1answer
92 views

How can we ensure sessions time out?

Had a request from Infosec to enforce a 15 min session timeout. Have configured it on the org-wide settings, have additionally configured it on the profile level. Still, after 15 mins, test user can ...
1
vote
2answers
457 views

Workbench: Invalid session id

EDIT: for some reason I'm unable to upload the image, so here is the screen shot of my workbench https://ibb.co/kVbpYQ I get the sessionID from Developer Console annoy window: System.debug(UserInfo....
1
vote
2answers
31 views

If I am building a custom app, does Salesforce handle the logins and security?

I want to learn how to develop in salesforce so I can build custom apps that can do some statistical analysis on data. I want to publish that app to the app exchange with the hopes that someone who ...
0
votes
2answers
427 views

How can I change the session expiration time?

I'm using the following code in an attempt to use the Salesforce REST API, but it seems my sessions are expiring immediately: var authenticationClient = new AuthenticationClient() { ApiVersion ...
0
votes
1answer
130 views

Rest Call to Salesforce

I am new Salesforce. I am trying to hit the below URL through the Rest client and I am passing the User name and Password as Basic Auth. https://github--staging.cs70.my.salesforce.com/services/...
2
votes
0answers
312 views

Invalid session using SOAP API

I'm using SOAP API to read some info from my org. The call flow is typical and work well for my other orgs: login (using old style username/password), set session id and server url then call describe. ...
0
votes
0answers
548 views

How to get the same Session ID when using VisualForce Page to run the Apex Class

I'm getting a different Session ID value when I use my VisualForce Page to run my Apex Class. Before that I been testing my codes using the Developer's Console and I could get my Chart from Salesforce ...
0
votes
2answers
2k views

Getting Session ID in Apex Class

I been trying to get my Session ID Parameters into my Apex class so that I can retrieve a Picture from inside Salesforce and send it out to Facebook. But I'm not sure why I'm not getting my Session ...
2
votes
1answer
2k views

How to test XSS/Content Sniffing protection in sandbox?

I have enabled XSS protection and Content Sniffing protection in sandbox. How can I test these security features in salesforce whether my org is XSS and content sniffing protected? I have enabled ...
0
votes
0answers
77 views

Custom login/registration pages for force.com site

Hello! I am developing a website as an online shop, and I encountered a problem with login and registration. I created portal with Authenticated Website license, which is assigned to site. I enable ...
6
votes
1answer
646 views

Session Id not getting refreshed automatically with Custom Auth provider in Salesforce Named Credentials

Problem statement : The Named Credential created for OAuth 2.0 authentication and Custom Auth provider works until the first session Id which was obtained using the method 'handleCallback' is valid. ...