Pages

Monday, April 17, 2017

“List 'User Information List' does not exist at site with URL” exception for users with member permission

Introduction

I was using SharePoint rest api in order to retrieve all the departments through user information list.

Problem

I was using

_spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('User Information List')/Items?$select=Department";

for the rest query. When I logged in as a site collection administrator, I got expected results.

But when I logged in as a site member I got the below exception.

List 'User Information List' does not exist at site with URL '<site url>'. 

List 'User Information List' does not exist at site with URL

Solution

Instead of using the above I used the below url and I got the expected results for users with the member permission as well.

_spPageContextInfo.webAbsoluteUrl + "_api/web/SiteUserInfoList/items?select=Department"

Wednesday, April 12, 2017

Convert SharePoint Online based SharePoint Hosted Add-in to SharePoint 2013 On premises based one

Introduction

We used SharePoint Online based template in Visual Studio 2015 in order to develop SharePoint hosted add-in.

Problem

Our client’s requirement is to deploy it in the SharePoint 2013 On premise. So we had to convert the solution.

Solution

Step 01:

  • Right click on AppManifest.xml and click on View Code.
  • Then change the SharePointMinVersion to 15.0.0.0

image

Step 02:

  • Double click on on Package.package under Package folder.
  • There you will find SharePoint Product Version. Change it to 15.0.

image

 

Conclusion

Now you can publish the solution and deploy to SharePoint 2013 On premise.