function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
pq100pq100 

Session ID in C#

Hi

I have a component in C# i'm using for SF integration which all works fine. I currently have a custom C# login screen which uses the entered values to retrieve the SessionID.

However, i'd like to set it up so that if the user is already logged on to Salesforce through a browser then i can retrieve the SessionId from that session and so skip the login process. Any ideas if this is possible and if so how i go about it?

Thanks for any suggestions
Paul
WolfyWolfy

So, if I understand correctly, you basically want to hijack salesforce session in another web or desktop application. If it's a web application - you won't be able to do that due to browsers' security, if it's a winform -  you could read the browser's cookie store to get the session id, but you would have to implement this for each browser (and version) differently. Most likely not worth the bother for a simple convenvience.

_Prasu__Prasu_

If your c# page is going to start from any Salesforce custom button, you can pass the SFURL and SESSIONID directly with the URL and that can be use for creating the Salesforce service