none
Shared With - Limit the number of users to be displayed when the link is clicked.

    Question

  • At present I have developed a site in O365 and it is shared to external users. When I click 'Shared With' it shows me the list of all the users to whom it is shared. Is their a way to limit the number of people that are shown in this area when the Shared With link is clicked.

    Earlier when we disabled this link, out site did not work because we had audience targeting set. Now we want to have the same user experience as before but limit the number of users to be displayed when 'Shared With' Link is clicked.

    Has anyone encountered such an issue. Is their a way to address the above problem?

    Thanks,

    Anand


    Thanks and Regards, Anand R. Deshpande

    Wednesday, April 27, 2016 8:07 AM

Answers

  • I've never tried to do this and none of the suggestions below are particularly good but they may give you some approaches to look at.

    The flyouts are generally done using display templates. If you find the standard one then you could modify it to amend the JavaScript used to pull those things through. It isn't a great option as doing so would be modifying an OOTB file and that can cause update issues in the future.

    Another option would be to try to re-direct to a copy of that display template for your master page or on specific pages.

    Finally you may be able to track down the function call that renders the fly-out and tack an extra action onto the render behaviour to hide all but the first two.

    Generally speaking i'd class this in the 'do not touch' area. MS will mess around with this behaviour without telling you and any changes you make add risk to your platform. That may be acceptable but you should go in with your eyes open.

    Thursday, April 28, 2016 10:41 AM

All replies

  • As per my understanding there is no such settings which restricts the number of users in that Shared With dialog. 
    Wednesday, April 27, 2016 10:24 AM
    Moderator
  • Thanks Amit. Yes their is no such setting. However I am looking from the perspective of - if their is any way to programmatically limit this list. Then we will be able to address the issue of people seeing to whom this information is shared with reference to external users.

    Thanks, Anand


    Thanks and Regards, Anand R. Deshpande

    Thursday, April 28, 2016 7:13 AM
  • What precisely do you want to do here? Do you want/need to hide some users in particular or do you just want to hide all after the first two that SharePoint decides to show? It sounds like you want something like the former, specifically direct control over the people listed.
    Thursday, April 28, 2016 8:43 AM
  • Ideally I want to hide all after the first two that SharePoint decides to show.

    Thanks, Anand


    Thanks and Regards, Anand R. Deshpande

    Thursday, April 28, 2016 10:33 AM
  • I've never tried to do this and none of the suggestions below are particularly good but they may give you some approaches to look at.

    The flyouts are generally done using display templates. If you find the standard one then you could modify it to amend the JavaScript used to pull those things through. It isn't a great option as doing so would be modifying an OOTB file and that can cause update issues in the future.

    Another option would be to try to re-direct to a copy of that display template for your master page or on specific pages.

    Finally you may be able to track down the function call that renders the fly-out and tack an extra action onto the render behaviour to hide all but the first two.

    Generally speaking i'd class this in the 'do not touch' area. MS will mess around with this behaviour without telling you and any changes you make add risk to your platform. That may be acceptable but you should go in with your eyes open.

    Thursday, April 28, 2016 10:41 AM
  • Thanks Alex for the reply. I agree with you, we are also of the opinion of not changing any OOTB file

    Thanks,

    Anand


    Thanks and Regards, Anand R. Deshpande

    Friday, April 29, 2016 9:25 AM