Guys please help me to restrict AD groups in people picker. AD groups should not be listed in people picker. I just need to have only the users to be shown in people picker. i.e.,Allow selection of "People Only", not "People and Group" in people picker.
2 Answers
Place the people you want to select within a new permissions group. Then in list settings, select people or group field. Then at the bottom you can select "Choose From" and select the SharePoint Group, as opposed to the alternative default of All Users. Hope this helps...
If you are using in a custom form with server-side control you have a property "SelectionSet" to restrict.
<SharePoint:PeopleEditor ID="peopelID" runat="server" Width="250px" Style="padding: 5px;" SelectionSet="User"></SharePoint:PeopleEditor>
You can read below article about this property https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.peopleeditor.selectionset.aspx
If you are rendering control using client side follow below syntax
initializePeoplePicker: function(controlId) {
var schema = {};
schema['PrincipalAccountType'] = 'User'; //'User,DL,SecGroup,SPGroup';
schema['SearchPrincipalSource'] = 15;
schema['ResolvePrincipalSource'] = 15;
schema['AllowMultipleValues'] = false;
schema['MaximumEntitySuggestions'] = 50;
schema['Width'] = '330px';
SPClientPeoplePicker_InitStandaloneControlWrapper(controlId, null, schema);
}
If you want this in OOB SharePoint column there is a "Allow selection of" setting to choose "People Only" or "People and Groups".