Office 2013 and later

Logs on to the social network site by using cached credentials.

HRESULT _stdcall LogonCached([in] BSTR connectIn, [in] BSTR userName, [in] BSTR password,  [out] BSTR connectOut);


[in] A string that can be empty or contains the logon credentials, depending on the context in which the OSC is calling LogonCached.


[in] A string that contains the user name.


[in] A string that contains the user’s password.


[out] An opaque string that contains credentials.

This method is called for authentication only if useLogonCached is set as true in the capabilities XML returned by ISocialProvider::GetCapabilities.

The Outlook Social Connector (OSC) calls LogonCached, and passes an empty string for connectIn and non-empty userName and password strings. The provider uses userName and password to log on to the social network, and returns an opaque connectOut parameter to the OSC if authentication succeeds. If authentication fails, the provider returns the OSC_E_LOGON_FAILURE error to the OSC.

The connectOut parameter is an opaque string to the OSC, and is passed to the connectIn parameter on subsequent attempts by the OSC to log on to the social network. The provider should place any credentials in the connectOut string that the provider wants the OSC to store across connections. The OSC does not interpret the string in connectOut, and encrypts the string for security purposes before storing it in the Windows registry.