SOC-4118: Implemented getLastIdentities and getLastSpaces