Skip to main content

Secure Store Service isn't available in SharePoint Foundation 2013

Submitted by ezybzy on

UPDATE: Microsoft confirms that they will remove this feature from SharePoint Foundation. It is an expected behavior.

After a lot of searching, I figure out its root clause.

Using ILSpy to see inside method Microsoft.Office.SecureStoreService.Server.SecureStoreServiceApplicationProxy.Execute(), the first condition check is as follows:

if (Licensing.HasExpired)
    ULS.SendTraceTag(1731227190u, ULSCat.msoulscat_SPS_SecureStoreService, ULSTraceLevel.High, "The trial period for this product has expired or this feature is not supported in this SKU.");
    throw new ProductExpiredException(Resources.ResourceManager.GetString("Sss_InvalidSku"));

Digging deeper inside Microsoft.Office.Server.Administration.Licensing class, there is a boolean property HasExpired which returns result depending on following conditions:

    return Licensing.m_ExpirationFileTime != 9223372036854775807L && DateTime.UtcNow.ToFileTime() > Licensing.m_ExpirationFileTime;

Note: the number shown above is the constant long variable named LicensedExpirationFileTime.

The static field m_ExpirationFileTime is set by the static constructor of this class.

Licensing.m_ExpirationFileTime = -9223372036854775808L;
    ULS.SendTraceTag(1634366517u, ULSCat.msoulscat_OSRV_SetupUpgrade, ULSTraceLevel.High, "Initializing Licensing API. This trace forces the initialization of ULS");
    Licensing.m_ExpirationFileTime = Licensing.GetExpirationFileTimeFromRegistry();
catch (LicensingException ex)
    ULS.SendTraceTag(926447969u, ULSCat.msoulscat_OSRV_SetupUpgrade, ULSTraceLevel.High, "{0}", new object[]

The GetExpirationFileTimeFromRegistry() method calls native method named GetExpirationTime() from OfficeServerSettings.dll which isn't bundled with SharePoint Foundation! (There is no %PROGRAMFILES%\Microsoft Office Server\15.0\Bin directory.) The following errors are shown in ULS.

[DATETIME]     psconfigui.exe (0x0764)                     0x0BF4    SharePoint Server                 Setup and Upgrade                 ajt5    High        Initializing Licensing API. This trace forces the initialization of ULS     
[DATETIME]     psconfigui.exe (0x0764)                     0x0BF4    SharePoint Server                 Setup and Upgrade                 78ya    High        Microsoft.Office.Server.Administration.LicensingException: An error was encountered getting expiration info. ---> System.DllNotFoundException: Unable to load DLL 'OfficeServerSettings.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)     at Microsoft.Office.Server.Administration.Licensing.NativeMethods.GetExpirationTime(Int64& expirationTime)     at Microsoft.Office.Server.Administration.Licensing.GetExpirationFileTimeFromRegistry()     --- End of inner exception stack trace ---     at Microsoft.Office.Server.Administration.Licensing.GetExpirationFileTimeFromRegistry()     at Microsoft.Office.Server.Administration.Licensing..cctor()

If the library is supplied, we will need to see which registry key is checked which I won't do for sure. The easiest way to solve this problem is letting Microsoft remove the checking (the first code snippet) from method Microsoft.Office.SecureStoreService.Server.SecureStoreServiceApplicationProxy.Execute().

Finally, we should get SSS administration page on SharePoint Foundation!