Вопрос

I am trying to get the data from User Info list using below JSOM code. but the issue is, it returns the data only when owner group user logged in to the site, for a visitor or even site members are facing issue "list 'user information list' does not exist at site with url http://siteurl, Please suggest what I am missing?

var siteUrl = '/';
var ctx = new SP.ClientContext(siteUrl);
var oList = ctx.get_web().get_lists().getByTitle('User Information List');
Это было полезно?

Решение

It's because the All Users is List and only Administrator has permissions to view it. If you want work under users identity not elevated to administrator, you must set at least view permissions for all users.

In JSOM you cannot run script under Elevated Privileges.

For set permissions use this link for All Users List:

https://c.sharepoint.com/_layouts/15/people.aspx?MembershipGroupId=0

Лицензировано под: CC-BY-SA с атрибуция
Не связан с sharepoint.stackexchange
scroll top