question

PranavLaxmikantJoshi-0791 avatar image
0 Votes"
PranavLaxmikantJoshi-0791 asked Jerryzy commented

What is the minimum permission needed for the client side people picker to work for a user

I have implemented client side people in SharePoint 2019 site in a custom form using plain HTML and jQuery. Requirement is to give user enough permission to use people picker but restrict from add/edit/delete data in Site Content.

Problem statement: The user with Contribute permission is able to resolve user in people picker. Where as user with Limited Access permission get error in user resolution in people picker.

I tried creating custom permission to meet the requirement. But if I remove edit/delete/add list item permission then client side people picker does not work.

Ge following error :

Sorry, we're having trouble reaching the server.

Would appreciate any help, suggestions or pointer to resolve this scenario.


office-sharepoint-server-development
image.png (8.5 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @PranavLaxmikantJoshi-0791 ,

Is there any update ? Did you try the suggestion test in SharePoint site page and check if there is any error using F12 ?

Thanks
Best Regards

0 Votes 0 ·
Jerryzy avatar image
0 Votes"
Jerryzy answered Jerryzy edited

Hi @PranavLaxmikantJoshi-0791 ,

When using Client People Picker, the current user should have at least the "View Only" permission level:

85542-snipaste-2021-04-08-10-25-23.png

85470-snipaste-2021-04-08-10-24-56.png


Thanks
Best Regards



If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

PranavLaxmikantJoshi-0791 avatar image
0 Votes"
PranavLaxmikantJoshi-0791 answered

Hi @Jerryzy-MSFT

Thank you for the reply. However, when giving View Only or Limited Access permission to the user the people picker still gives the same issue. The users are not resolving.
85662-image.png



image.png (21.7 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Jerryzy avatar image
0 Votes"
Jerryzy answered

Hi @PranavLaxmikantJoshi-0791 ,

I tested with the View Only permission user which could resolve user in Client People Picker without problem:

85684-snipaste-2021-04-08-15-36-56.png

85674-snipaste-2021-04-08-15-34-09.png


This is the script I am using, please check the attachment below:

85635-clientpeoplepicker.txt

Thanks
Best Regards



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

PranavLaxmikantJoshi-0791 avatar image
0 Votes"
PranavLaxmikantJoshi-0791 answered Jerryzy commented

@Jerryzy-MSFT Will try this and check. Thank you.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Is there any update ? Please try the script in the answer to see if it works.

Thanks
Best Regards

0 Votes 0 ·
PranavLaxmikantJoshi-0791 avatar image
0 Votes"
PranavLaxmikantJoshi-0791 answered Jerryzy commented

Hi @Jerryzy-MSFT,

Apologies for the late reply. Tried the script in a OOB SharePoint Page and it is working fine for user with limited access permission.
However still giving issue on the custom form that I am creating in SharePoint WebPart page.

Still trying to figure out what's the difference, by trying some code changes.

Will keep you posted.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Try to check if there is any error message using F12 for the custom form, as the script is working in the built in SharePoint page.

Another information is that the sp.js and Client People Picker needs to be used in SharePoint internal page, outside of SharePoint, it won't work.

0 Votes 0 ·