3

How to add a people picker textbox/control on a page in O365 site that will take the name of the users who have access to the site.

4
  • on which page, you want to add people picker textbox/control?
    – Hardik
    Commented May 17, 2016 at 10:56
  • i have added an aspx page that will have a user input form(some labels and textbox controls) i need an option to add an approver that shoudl be a user who has access to the site.
    – MJaiswal
    Commented May 17, 2016 at 10:59
  • There may be lots of users who do have an access to the site. do you want them all?
    – Hardik
    Commented May 17, 2016 at 11:04
  • yes currently i am looking for both, for all users and for specific group if any created(like Approvers)
    – MJaiswal
    Commented May 17, 2016 at 11:22

1 Answer 1

2

Perhaps you can use the client-side People Picker control.

From MSDN:

The client-side People Picker control lets users quickly search for and select valid user accounts for people, groups, and claims in their organization. The picker is an HTML and JavaScript control that provides cross-browser support. Adding the picker to your add-in is easy: In your markup, add a container element for the control and references for the control and its dependencies. Then in your script, call the SPClientPeoplePicker_InitStandaloneControlWrapper global function to render and initialize the picker.

See the complete article with sample code here.

7
  • The HTML part "SharePoint:ScriptLink name=" gives error, what am i missing
    – MJaiswal
    Commented May 17, 2016 at 12:41
  • Which error? ... Commented May 17, 2016 at 12:45
  • <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server"> <SharePoint:ScriptLink name="clienttemplates.js" runat="server" LoadAfterUI="true" Localizable="false" /> says Sharepoint is unrecognized tag
    – MJaiswal
    Commented May 17, 2016 at 12:46
  • Where are you building the page? Commented May 17, 2016 at 12:50
  • i am creating a provider hosted app for 0365 portal from visual studio. Is that what you are asking?
    – MJaiswal
    Commented May 17, 2016 at 13:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.