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
2
votes
1answer
606 views

How to create trigger for DatedConversionRate object

We're using multicurrency in our project. DatedConversionRate has been updating every day by external process. The requirenment is to update CurrencyType records with most relevant rates. At the ...
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 ...
1
vote
2answers
2k views

Bulk API: using Workbench InvalidSessionId (Unable to find session id)

I'm following this (Bulk Api) Trailhead, I have valid SessionId and when I try to authenticate I'm getting the following error: I have created few records using the same SessionId and I know its a ...
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 ...
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
2answers
3k views

Did the session id value disappear from the workbench?

I remember that the session information menu option used to display a session id value in the workbench? Is that no longer visible? I can still get this by executing this line of code in the Apex ...
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
76 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/...
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 ...
3
votes
3answers
2k views

How do I retrieve the server and session id from the Salesforce iOS API?

I'm currently trying to hack in some functionality to download attachment data for an iOS Salesforce application. I'm going to do that using a direct HTTP request, but for that to work I need to pull ...
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
122 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 ...
1
vote
0answers
108 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
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
2answers
656 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 ...
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 ...
3
votes
3answers
459 views

Salesforce logout hook

Is there any way I can know when a Salesforce user logs out of the website? I'm providing a service that will probably reside in an iFrame displayed on SF pages and need to know when to do some ...
10
votes
0answers
118 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
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 ...
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
441 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
336 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
320 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
198 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
228 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 (...
1
vote
1answer
503 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?
6
votes
2answers
669 views

Losing StandardSetController selected records with first visit to VF page

I have a VF page that leverages a custom object's StandardSetController to compare records. I created a custom button to allow users to select records of that object from a related list and compare ...
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->...
3
votes
1answer
560 views

Session settings - timeout

I set the session expiration timeout for my org to 8 hours in sandbox. However, the session continues expiring at 15 minutes. Can anyone let me know, whether I need to change another setting. Thanks....
18
votes
2answers
10k views

Getting Session ID in Lightning

Background I'm using Apex Wrapper Salesforce Metadata API to update some picklist values on the fly. (i.e. Every time a record is inserted/updated/deleted in Table A, I'm adding/subtracting picklist ...
5
votes
1answer
768 views

How can I find the AuthSession that corresponds with the current Session Id?

In my external application I have a Session ID (a.k.a Access_Token) and server URL. This may have been sourced from any number of locations. Such as: A Composite Apps query string URL on the iframe A ...
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 ...
2
votes
3answers
4k views

Invalid Session ID found when multiple API clients login using the same account

I am using Salesforce SOAP API through the jar files. We have set the session timeout to 12 hours. I am using one username/password to login in for all the client instances running on different JVMs. ...
1
vote
0answers
459 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=...
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/...