Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

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
1
vote
1answer
42 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
74 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
57 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
75 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
43 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
34 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, ...
0
votes
0answers
121 views

{“message”:“Session expired or invalid”,“errorCode”:“INVALID_SESSION_ID”}

Help! We are getting this error with our connected app. {"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"} What could be causing this? We are using sandbox. The Instance URL ...
0
votes
0answers
113 views

Salesforce mobile app session settings

Salesforce mobile app logs out if there is not activity for long time.Is there any settings to make sure it logs in always.I have 2 hours as session settings under profile level and 2 hours under org ...
1
vote
0answers
107 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
116 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
102 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
88 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
53 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
117 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
147 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
440 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
49 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
296 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
335 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
319 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
197 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
110 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
227 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
83 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
75 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 (...
2
votes
1answer
2k 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
283 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
2k 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
159 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
205 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 ...
1
vote
0answers
458 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
411 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
30 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
21 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
1k 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/...
1
vote
2answers
655 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
130 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
273 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
280 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 ...
2
votes
1answer
200 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
501 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
1k 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
187 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
624 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
32 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
552 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
179 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
479 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. ...