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.

  • on which page, you want to add people picker textbox/control? – Hardik May 17 '16 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 May 17 '16 at 10:59
  • There may be lots of users who do have an access to the site. do you want them all? – Hardik May 17 '16 at 11:04
  • yes currently i am looking for both, for all users and for specific group if any created(like Approvers) – MJaiswal May 17 '16 at 11:22

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.

| improve this answer | |
  • The HTML part "SharePoint:ScriptLink name=" gives error, what am i missing – MJaiswal May 17 '16 at 12:41
  • Which error? ... – Juan Pablo Pussacq Laborde May 17 '16 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 May 17 '16 at 12:46
  • Where are you building the page? – Juan Pablo Pussacq Laborde May 17 '16 at 12:50
  • i am creating a provider hosted app for 0365 portal from visual studio. Is that what you are asking? – MJaiswal May 17 '16 at 13:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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