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
15 views

cache.Org.OrgCacheException: Failed Cache.Session.getDefault():Session not found - Session Cache not supported [closed]

Any idea why getting this error? Reasons for these kind of exceptions. [35]||cache.Session.get(String)|EXCEPTION_THROWN |[44]|cache.Org.OrgCacheException: Failed Cache.Session.getDefault():Session not ...
0
votes
0answers
40 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 ...
0
votes
0answers
31 views

Cant logout of lightning community

I just set up a Lightning Community. It has an, "out of the box" user profile menu. Unauthenticated users just see a "Log In" menu option that when clicked takes them to the ...
1
vote
2answers
106 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
46 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
0answers
22 views

REST service INVALID_SESSION_ID only it's actually valid

We're using an XmlHttpRequest to allow users in our Community to upload files. let xhr = new XMLHttpRequest(); xhr.open('POST', targetUrl, true); xhr.setRequestHeader('Accept', '*/*'); xhr....
0
votes
0answers
27 views

How to Renew Visualforce Page Session with JSforce

I have a visualforce page that is running with jsforce. I use it to query, create, update and deleted records in my page without reloading the page. For a longer period or idle time, I started to ...
0
votes
1answer
66 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
37 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 ...
0
votes
0answers
11 views

How to create and manage session for sites for force.com in Salesforce

We have created a portal to login to the sites for the customer. We are managing the credential(username and password) on the third party website. When I open this link anywhere it shows that the ...
8
votes
1answer
234 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
22 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 ...
0
votes
0answers
30 views

User login “mix-up” when using lightning out in external site

I have met serious security problem when developing lightning out components and using them in external resource. This is out workflow: We authenticate in SF org as 'admin' user with OAuth2 and get ...
2
votes
0answers
50 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
433 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
367 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
155 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
257 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
47 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
83 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
215 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
309 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
158 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
189 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
78 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
166 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 ...
1
vote
1answer
378 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
680 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
103 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
651 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
536 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
829 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
432 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
220 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
469 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
144 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
88 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
3k 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
552 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
3k 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
186 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
233 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
826 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
526 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
56 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?
5
votes
1answer
2k 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/...
2
votes
2answers
1k 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 ...