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
evgenykaevgenyka 

Single sign on SSO from Self servise portal SSP

Hello
I have a customer logged in to Self servise portal and i have created a link for him which is passing hes session_id to another php application
I would like to get self service user data based on this link is this possible?
Does anyone got a code example?


 Code:
$mySforceConnection = new SforcePartnerClient();
$mySoapClient = $mySforceConnection->createConnection('/home/xxm_php/wsdl.xml');
$mySforceConnection->setSessionHeader($s_id);
$mySforceConnection->setEndpoint('https://na3.salesforce.com/services/Soap/u/7.0');
print_r ($mySforceConnection);
$result=$mySforceConnection->getUserInfo();
The following code works fine for me for regular sfdc user but when i am trying to use getUserInfo with Selfe service session id i am getting the following error

Fatal error: Uncaught SoapFault exception: [sf:INVALID_SESSION_ID] INVALID_SESSION_ID: Self Service User Sessions are not valid for use with the API in /home/xxm_php/sforce-php/soapclient/SforceBaseClient.php:627


Any help here?
Thanks