O365 CSOM (javascript) 'SiteOwners' managed property in Search results

The requirement is to pull SiteOwners [secondary site collection admins] for each site on Office 365 tenancy, using CSOM (JavaScript).
The following is the code
var keywordQuery = new Microsoft.SharePoint.Client.Search.Query.KeywordQuery(context);
keywordQuery.set_queryText('contentclass:"STS_Site" contentclass:"STS_Web"');
keywordQuery.set_trimDuplicates(false); //returns sub-sites
var Managedproperties = ['Title', 'Path', 'SiteDescription', 'ParentLink', 'Rank', 'SiteLogo', 'SiteName', 'Author', 'SiteID', 'WebId', 'SiteOwners', 'AuthorOWSUSER', 'WebTemplate'] //'People','SiteMembers'
var kwqProperties = keywordQuery.get_selectProperties();
for (var i = 0; i < Managedproperties.length; i++)
kwqProperties.add(Managedproperties[i]);
var searchExecutor = new Microsoft.SharePoint.Client.Search.Query.SearchExecutor(context);
searchresults = searchExecutor.executeQuery(keywordQuery);
context.executeQueryAsync(onQuerySuccess, onQueryFail)
Though "SiteOwners" [secondary site collectin admins] are defined for each site, the value for "SiteOwners" is always empty ("").
Though calls can be made to individual sites to pull the siteowners, want to avoid multiple calls by making use of Indexed search data.
Any suggestion/help please.
Sai

The SiteOwners managed property has no crawled property mapped to it. There does not appear to be a specific site owners crawled property. I would suggest using the Author managed property. It appears to be the same as the site owner. Some side loaded
or installed third party apps will have System Account as the author, this would be correct since a timer job deploys the app.
Blog | SharePoint Field Notes Dev Tools |
SPFastDeploy | SPRemoteAPIExplorer

Similar Messages

  • Show Custom property in search results

    Hi,
    I'm sure I just miss one small thing here... hope you guys can help me out:
    I've created a custom user property. Added a value to it on a user and created a managed property based on this.
    When I do a search I only get results if I in the query type NameOfManagedProperty:Value
    If I only type the value nothing is returned. How do I change this?
    Thank you.

    Hi Jan,
    Glad that you have solved the issue, and thanks for your sharing.
    Thanks,
    Daniel Yang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Daniel Yang
    TechNet Community Support

  • Display 'Modified By' property in search results

    Hello All,
    Can anybody help us to display the modified by information on search results.
    Current search results displaying 'Author'. But I want to display the user name who last modified the document.
    Please suggest.
    Thanks & Regards

    Hi,
    You will need to create a new 'metadata property' through search and map it as below (though there is 1 OOTB property but you cannot use it) -
    1) Create metadata property, say 'Modified By User' (text)
    2) Map it to - ows_Modified_x0020_By(Text) , ows_ModifiedBy(Text) , Office:8(Text)
    3) Run a full crawl
    4) After this, you need to modify the search results XSLT to add 'Modified By' in the results page. You will find good articles on this on MSDN/Technet (check here - https://msdn.microsoft.com/en-us/library/office/ms560074(v=office.14).aspx)

  • RH10: Snippets from resource manager show in search results

    I'm new to using the resource manager, so there's a good chance I've done something stupid here... but...
    I have 2 projects (I am the only tech writer, so running off one PC, no version control). I want to share snippets between the projects, so I'm using the resource manager to keep them synched up. Both are compiled as CHMs.
    When I search, I'm getting search results that appear to be the snippets in the results. When you double click them, they don't open.
    Here's a screenshot of what I'm seeing.
    Has anyone else seen this before? I'm using RH10.

    I have set up a test and cannot get snippets to show in search results.
    I am a little puzzled by the fact that you say they appear to be snippets, thus casting some doubt.
    Do you have snippets with those names and do the snippets contain the term being searched.
    Do you have topics with those names?
    Does it happen in a new project?
    Try creating a new SSL, not a duplicate.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • IronPort Security Management Appliance - Directory Search Results Size

    I'm creating an access policy for a web security appliance that is applied to an authorized group within an idenity.  My question is in regards to the number of returned results when using the Directory search function to find and add the group.  Only the first 500 matching entries are shown and attempting to search for the group fails if it isn't part of that first 500.  How do I increase the amount of results returned when searching for groups?

    Hello Alex,
    By default, Active Directory does not respond to LDAP based queries which return more than 1000 results. If you have more than 1000 groups configured in Active Directory, it is necessary to increase the maximum page size (MaxPageSize) using the Ntdsutil.exe tool.
    http://support.microsoft.com/default.aspx?scid=kb;en-us;315071&sd=tech
    MaxPageSize - This value controls the maximum number of objects that are returned in a single search result, independent of how large each returned object is. To perform a search where the result might exceed this number of objects, the client must specify the paged search control. This is to group the returned results in groups that are no larger than the MaxPageSize value. To summarize, MaxPageSize controls the number of objects that are returned in a single search result.
    Default value: 1,000
    You can also simply input the group name and then click "Add" to manually add it as a workaround.
    Hope it helps.

  • How to use search REST api to get custom managed property data for anonymous user?

     
    I am trying build a public portal with anonymous access and i am trying to read some
    content from custom managed property using search REST api in sharepoint 2013. I have tried to enable all possible attributes of the managed prop. Like searchable,queryable,safe etc. also i am including queryparametertemplate in my REST api search query. But
    still i am not able to retrieve the managed prop. For an anonymous user. The same query returns the value if i am logged in.
    Any Help is greatly appreciated. 
    Thanks,
    Rakesh
    Thanks, Rakesh

    Hi Rakesh,
    To enable anonymous Search REST queries, we need to create queryparametertemplate.xml and upload it to the correct library in SharePoint.
    From your description I can know that you have created the file, then I recommend to check the things below:
    Please use “QueryTemplatePropertiesUrl” instead of “queryparametertemplate” in the Search REST API query as following: &QueryTemplatePropertiesUrl='spfile://webroot/queryparametertemplate.xml'.
    Make sure that the Query Properties you need have been added to the QueryProperties element in the queryparametertemplate.xml file.
    Make sure that the query parameters you need have been added to the WhiteList element in the
    queryparametertemplate.xml file. For example, if you want to use Refiners in the REST API, then the Refiners should be added to the
    WhiteList element in the queryparametertemplate.xml file as following:
    <a:string>Refiners</a:string>.
    You can also debug setting properties in anonymous Search Rest queries following the link below:
    http://www.mavention.com/blog/debugging-setting-properties-anonymous-search-rest-queries
    More references about anonymous Search REST:
    http://blog.mastykarz.nl/configuring-sharepoint-2013-search-rest-api-anonymous-users/
    http://msdn.microsoft.com/en-us/library/office/jj163876%28v=office.15%29.aspx#bk_AnonymousREST
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • Search managed property date format dd/mm/yyyy instead of mm/dd/yyyy

    All regional settings in the site collections and the search site have been set to English(Australia), and the date format is correct within them however when I try to perform a search on a managed date property date:dd/mm/yyyy I do not get the expected
    results. I only get the correct results when searching date:mm/dd/yyyy.
    I found some articles regarding SP2010 and this issue, the correct answer was a link to a TechNet article with information about how to modify the XSLT in the results web part in the search centre. I could not find the XSLT in the results web part properties
    in SP2013 so I don't know if this information is redundant or if there is an easier way.
    It really seems like such a simple and common request so I can only imagine that its too obvious to blog about considering the time I've put into google on this one, and am I'm missing something here?
    Thanks,

    Hi karlostavitch,
    This issue seems to be caused by Query Language. Query Language is not the language of the Browser interface, but the language submitted to web sites. By default, the property of search results is null, the locale will be inferred from the browser language.
    You can change query language by exporting the Search web part, then adding query language property to the file.
    More information, please refer to the link:
    http://blog.orbitone.com/post/Language-sensitive-search-results-in-SharePoint
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Cannot see managed properties values in search result webpart- Sharepoint online

    Hi,
    Cannot see custom managed properties at site collection level in ResultScriptWebPart for SharePoint online. where as it is visible when i create managed properties @SSA (Search Service Application) level.
    Below are the steps which I followed:
    1) I have added few custom managed properties at Search Site collection level in SharePoint online.
    2) Mapped those properties to user profile crawled properties
    3) We are using those custom managed properties in ResultScriptWebPart(People Search Core Results) by using ItemTemplate
    I cannot see those managed properties in search result.When I debug it in browser it comes as null.
    But when I add these managed properties @SSA (Search Service Application) level I can see the value in search result webpart.
      What is the reason value doesn't get populated  at Site Collection level?
    Thanks,
    Prashant A

    Hi Prashant,
    Based on your description, the site collection managed property cannot work in SharePoint Online.
    For troubleshooting this issue, I recommend to verify the things below:
    Please make sure that the full crawl has been run after creating the managed property.
    Please check if the managed property is set to be searchable.
    Please search with this managed property to see if the results can be returned.
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • JSF/Spring integration - managed-property problem

    I am using JSF 1.1_01 (MyFaces 1.1), Spring 1.2, Ajax4Jsf.
    The JSF application has h:selectOneMenu .
    On change event of h:selectOneMenu sets "selectedValue" into backing bean as shown below:
    page.jsp
    <h:selectOneMenu value="#{test.selectedDevice}" >
    <f:selectItem itemValue="0" itemLabel="--New--"/>
    <f:selectItem itemValue="1" itemLabel="WorkStation"/>
    <f:selectItem itemValue="2" itemLabel="Router"/>
    <f:selectItem itemValue="3" itemLabel="Switch"/>
    <ajax:support action="#{test.loadDevice}" event="onchange" reRender="t2,t3,t4,t5"/>
    </h:selectOneMenu>
    TestBean.java (Backing Bean)
    public String getSelectedDevice() {
    logger.info(" *** In getSelectedDevice *** ");
    if (selectedDevice == null) {
    selectedDevice = "0"; // This will be the default selected item.
    return selectedDevice;
    public void setSelectedDevice(String selectedDevice) {
    logger.info(" *** In setSelectedDevice *** ");
    this.selectedDevice = selectedDevice;
    Here are the configuration file snippets for integrating JSF Spring
    web.xml
    <listener>
    <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
    </listener>
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/applicationContext.xml</param-value>
    </context-param>
    faces-config.xml
    <application>
    <variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
    </application>
    <managed-bean>
    <managed-bean-name>test</managed-bean-name>
    <managed-bean-class>test.TestBean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
    <property-name>deviceManager</property-name>
    <property-class> test.DeviceTypeManager </property-class>
    <value>#{deviceManager}</value>
    </managed-property>
    </managed-bean>
    The above code results in the following error
    javax.faces.FacesException: Cannot get value for expression '#{test.selectedDevice}'
    The error occurs only if i include <managed-property> inside the <managed-bean> in faces-config.xml.
    The moment i remove <managed-property> from face-config.xml the error disappears & page gets rendered properly.
    The purpose in having <managed-property> inside managed-bean is to call Spring's Manager class (i.e. deviceManager) from JSF application
    Any pointers/suggestions in resolving the error will be highly appreciated
    Regards
    Bansi

    The TestBean have a property for DeviceManager along with setter/getter methods as shown below. Sorry for not including in earlier posting
    TestBean.java (Backing Bean)
    private DeviceTypeManager deviceManager;
    public DeviceTypeManager getDeviceManager() {
         return deviceManager;
    public void setDeviceManager(DeviceTypeManager deviceManager) {
         this.deviceManager = deviceManager;
    Here are the two scenarios
    Scenario 1 : without <managed-property> the code works fine
    Scenario 2 : with <managed-property> the code results in following error
    javax.faces.FacesException: Cannot get value for expression '#{test.selectedDevice}'
    Scenario 1 has only JSF whereas Scenario 2 has JSF-Spring integration
    The Scenario 1 works absolutely fine as the expression '#{test.selectedDevice}' gets its value from setter/getter method in the backing bean(TestBean.java) . This is expected behaviour & wondering why it doesn't work similarly in Scenario 2 instead it complains
    Cannot get value for expression '#{test.selectedDevice}'
    I am willing to upload the war file. Any pointers/suggestions in resolving the error will be highly appreciated
    Regards
    Bansi

  • Add custom properties to People Search Results

    Good morning,
    I am trying to include some custom properties to our Search Results. These are the steps I have followed so far:
    Create User Profile Service Property and sync to AD. The property is populated for different users.
    Run full crawl
    Create managed property on the Schema, and map this to the crawled property
    Created a new version of the Item_Person.html template and changed its title.
    Upload to the Display Templates gallery, and created a new Result Type with this as its template
    Added the new property to the mso:ManagedPropertyMapping tag
    Went to Search Result Types, and selected "Update" on the Property Sync alert
    On the new template, the new property appears on the object ctx.CurrentItem, but its value is null.
    Am I missing something? Tried running full crawl and incremental crawl. Even tried removing the index first.

    Hi,
    Please try to add custom properties using Central Admin.
    I find a thread with the same question, check this:
    http://sharepoint.stackexchange.com/questions/123090/add-custom-properties-to-people-search-results
    More information:
    http://blogs.technet.com/b/tothesharepoint/archive/2013/09/11/how-to-display-values-from-custom-managed-properties-in-search-results-option-1.aspx
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Search results showing the source before the document title

    Hello,
    I have created a BI Catalog in Sharepoint 2010, which consists mainly of libraries with rdl items and I have also set a content source in Search Service to search into these libraries. Search results were fine, but after the
    last crawl I have noticed a change in the titles. The latest crawled items begin with  "Reporting Services -" in the title which probably is resulted by a
    differientiation in the crawl method. All the past crawled items keep the document name as a title without any prefix.
    I  am also certain that the problem is not in the web part which presents the results, because I have found in database level that the title field in the
    dbo.MSSCrawlURL table is prefixed for the new items. If you have experienced the same problem please help.  Thank you in advance.

    Hi,
    I'm seeing the same issue after upgrading the SharePoint 2010 to SharePoint 2013.
    When I search any upgraded document in SharePoint 2013, the document's "Last Modified Date" was showing an incorrect value in Search Results page but other metadata of document like "Last Modified User" is showing the correct
    value so the problem is not with document crawl, something wrong with Last Modified Date property in Search results.
    I have seen below comment as answer but I didn't understand the solution to fix this issue for all upgraded documents.
    The most likely cause is that there is metadata on the documents that is set to that date which is overriding the other dates in the search result. SharePoint isn't particulary imaginative so it's got to be finding that date from somewhere.
    Do we have any solution for this issue? Is this issue will be addressed in SharePoint 2013 SP1?
    Note: No issues with documents, which uploaded after upgrade.

  • Apply Thumbnail ResourceRender to TREX Search Result

    Hi Guys,
    My Scenario is,
    I have to show the Thumbnail images in Search Result (TREX). I indexed my image gallery folder in KM. TREX works fine.
    And I Customize existing search result's ResourceRender for my need.
    I want to show the Thumbnail images (left side)  in search result if the result is image category.
    Is it possible? any other way to solve this?
    Thank you,
    Regards,
    Devasarathy Pandi

    Thank you Guys,
    Solved Throguh Applying this display property in Search Result Renderer Settings.
    rnd:thumbnail(width=100/height=100/alignLeft/contentLink),
    Thank you,
    Regards,
    Devasarathy Pandi.

  • Search results showing incorrect modified date

    Hi All,
    I have a one difficulty in search results.
    Document showing incorrect modified date in search results. And this happens for one document only.
    We have customized the search/results.aspx page, Our document is showing correct modified date in document properties,All Items.aspx like 31/4/2013.
    But when i search with document name in search, result showing incorrect modified date like 24/6/2004.
    I checked with database in SQL, every thing is fine.
    I have updated the Modified date through powershell script for one document and after that this recent modified date is showing in search results.
    But after updating the Modified date through powershell, issued document not showing the recent modified date in search results. still showing as 24/6/2004.
    I should not do edit property and save, to create new version.
    I don't know what is happening in search crawl. All ready full crawl running daily basis.
    I want to check whether this issued document is crawling or not. Could anybody help me to get out of this. what is the main cause of this issue.
    Thanks & Regards
    MD.Liakath ali

    Hi,
    I'm seeing the same issue after upgrading the SharePoint 2010 to SharePoint 2013.
    When I search any upgraded document in SharePoint 2013, the document's "Last Modified Date" was showing an incorrect value in Search Results page but other metadata of document like "Last Modified User" is showing the correct
    value so the problem is not with document crawl, something wrong with Last Modified Date property in Search results.
    I have seen below comment as answer but I didn't understand the solution to fix this issue for all upgraded documents.
    The most likely cause is that there is metadata on the documents that is set to that date which is overriding the other dates in the search result. SharePoint isn't particulary imaginative so it's got to be finding that date from somewhere.
    Do we have any solution for this issue? Is this issue will be addressed in SharePoint 2013 SP1?
    Note: No issues with documents, which uploaded after upgrade.

  • Visio vsdx files don't have a hover panel display in search results

    Greetings,
    I've noticed that Visio documents with vsdx extension don't have a document icon in the search results, nor do they have a hover panel to preview the document.
    It seems like it's supposed to be there out of the box according to this article. Any thoughts?
    https://technet.microsoft.com/en-us/library/dn386874.aspx
    -Doug

    Hi,
    From your reply, you wants to get the icon for Visio document, and the steps to build a hover panel to render a Visio document.
    For the icon issue, the Visio documents with vsdx extension don't have a document icon in the search results, so we need to create icon for the Visio document.
    The following articles are about creating icon for some types of document, hope they will help:
    How to: Change the Icon for a Search Result:
    https://msdn.microsoft.com/en-us/library/office/cc789805(v=office.12).aspx
    How to display values from custom managed properties in search results - option 1:
    http://blogs.technet.com/b/tothesharepoint/archive/2013/09/11/how-to-display-values-from-custom-managed-properties-in-search-results-option-1.aspx
    For the hover panel issue, we need to create hover panel display template for Visio documents. There are three steps we need to follow:
    Decide which hover panel display template to modify
    Copy an existing hover panel display template
    Modify a hover panel display template to show values from custom managed properties
    Detailed information, please refer to the article below:
    How to display values from custom managed properties in the hover panel in SharePoint Server 2013:
    http://blogs.technet.com/b/tothesharepoint/archive/2013/09/17/how-to-display-values-from-custom-managed-properties-in-the-hover-panel-in-sharepoint-server-2013.aspx
    Best Regards,
    Lisa Chen
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Make Search Managed Property ViewsLast7DaysUniqueUsers Sortable

    Hello,
    I am implementing Most Read Pages functionality, so want to have OOB - Search Managed Property "ViewsLast7DaysUniqueUsers" as a Sortable. But it is non-editable in O365. Also, I cannot see any crawled property
    being mapped to this managed property.
    Can anyone please suggest?
    Regards, Nanddeep Nachan

    I better thought of using ViewsLifeTimeUniqueUsers or ViewsRecentUniqueUsers
    Regards, Nanddeep Nachan

Maybe you are looking for

  • Transaction type 100 not posible (posting to affiliated company)

    Hil While asset acquistion posting in f-90 ia geting error message "Transaction type 100 not posible (posting to affiliated company)" can you please give solution for this one

  • Drop box thinks I am offline

    Hi, I noticed my drop box folder wasnt saving the work I had done so decided to use a clean up app to delete it, then I went to and downloaded it again. Now I get this???

  • PO GRPO lead time

    Hi, If anyone can help me with a query it would be greatly appreciated. What I'm trying to get to is the average lead time from PO to GRPO at a number of levels. Here's an example of the code I've got for the first step: SELECT T0.[ItemCode] 'Item Co

  • Contextual menu in finder "open with" has multiple entries of same apps

    When I use the contextual menu (right click) on documents, the menu point "open with..." shows multiple entries of the same programs. For example when right clicking a PDF, there appears 5 times neoOffice, 2 times Preview, 6 times ... any other appli

  • How do I recover bookmarks deleted in error?

    In deleting unwanted bookmarks, I deleted a potentially useful one in error. Is there any way of restoring deleted bookmarks?