Sharepoint AddIn: Read items from a list by code

I started developing a Sharepoint Provider Hosted AddIn a few days ago. In this AddIn I want to read items from a list and display them in a special way. I found nearly all needed information on the Microsoft Docs. But one important information isn’t mentioned or I didn’t get it: You have to give permissions to the app otherwise you can read the list title but any item.

For giving the app permissions go to the AppManifest.xml and add a area List with the permission FullControl.

Build your project again and start it. You’ll see a Sharepoint page where you are asked if you trust your app and where you can define in a dropdown which list should be fully controlled by the app. Afterwords your app will get all items of the list if needed.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert