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');