mercredi 25 mars 2015

Keyword query returning results from non shared site also



I am using KeywordQuery (KQ) to get items from SharePoint. My site structure is as follow:


http://server/site1


http://server/site1/siteA


User Bob has access to all the site (Read) while Alice only has access to site1.


As expected, for Bob the KQ returns results from all site, but for Alice it also returns items of SiteA even she doesn't have access to it.


Could you please specify which parameters am I missing while creating the KQ object.


My KQ object has following properties: Querytext, RowLimit and Select Properties.


UPDATE


Client Context that I am passing to KQ



SharePointContextToken contextToken = TokenHelper.ReadAndValidateContextToken(token, request.Url.Authority);
string accessToken = TokenHelper.GetAccessToken(contextToken, targetWeb.Authority).AccessToken;
clientContext = TokenHelper.GetClientContextWithAccessToken(targetWeb.ToString(), accessToken);







0 commentaires:

Enregistrer un commentaire