Openfire/Spark - Advanced Search problem

For SSO you may want to watch this tutorial How To: Video on setting up SSO/AD with Openfire
As for the search, i’m afraid it probably won’t work this way.