When running a Policy Server as IDP in the Federation scenario and when a user logs in, the Policy Server faces a problem to set the session data into the Session Store.
The Policy Server log reports an error:
[2616/1932][Tue Jan 07 2020 11:55:41][SmSSInLDAPStore.cpp:1173][ERROR][sm_LoginLogout_01001] Fail to create object cn=<value>=,smSessionId=<value>=,o=sessionstore. (32)
[2616/1932][Tue Jan 07 2020 11:55:41][SmSessionServer.cpp:785][ERROR][sm-Server-06007] failed. Error code : 2
[2616/1932][Tue Jan 07 2020 11:55:41][IsAuthorized.cpp:68][ERROR][sm-Server-02740] SmSessionVariableProvider::SetSessionVariable() - SetVariable Failed for : UserNameIDFormat.SP.<value>
Turning off the option "Use Authenticated user's security context" in the Active Directory (AD) doesn't make any effect (1).
Check if the realms are all persistent and decide if persistence is needed or not.
Having a mixture of persistent and non-persistent realms can provoke this error.
Remove also all SLO configurations that are not in use.