Not able to get the data from rest api
sunilbhuyar opened this issue · 0 comments
sunilbhuyar commented
Hi ,
I need to get data from rest api but I am getting forbidden error. I need to pass a security token for every post call but here I dont knoe how we can do that ...
please help ...
below is my code
$('.flexdatalistNewUser').flexdatalist({
minLength: 1,
valueProperty: 'id',
selectionRequired: true,
url: "_api/SP.UI.ApplicationPages.ClientPeoplePickerWebServiceInterface.ClientPeoplePickerSearchUser",
searchIn: 'Key',
requestType: "POST",
params: {
queryParams: {
__metadata: {
type: 'SP.UI.ApplicationPages.ClientPeoplePickerQueryParameters'
},
AllowEmailAddresses: true,
AllowMultipleEntities: false,
AllUrlZones: false,
MaximumEntitySuggestions: 50,
PrincipalSource: 15,
PrincipalType: 15,
QueryString: $scope.value,
Required: false,
//SharePointGroupID: null,
}
},
success: function (result) {
console.log(result)
}
});