{"id":231,"date":"2020-10-09T12:47:25","date_gmt":"2020-10-09T12:47:25","guid":{"rendered":"http:\/\/tutorials.moedesign.de\/blog\/?p=231"},"modified":"2020-10-09T12:47:25","modified_gmt":"2020-10-09T12:47:25","slug":"read-items-from-list-in-sharepoint","status":"publish","type":"post","link":"http:\/\/tutorials.moedesign.de\/blog\/read-items-from-list-in-sharepoint\/","title":{"rendered":"Sharepoint AddIn: Read items from a list by code"},"content":{"rendered":"<p>I started developing a <strong>Sharepoint Provider Hosted AddIn <\/strong>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 <a title=\"Get list items\" href=\"https:\/\/docs.microsoft.com\/de-de\/previous-versions\/office\/developer\/sharepoint-2010\/ee534956(v=office.14)\" target=\"_blank\" rel=\"noopener noreferrer\">Microsoft Docs<\/a>. But one important information isn&#8217;t mentioned or I didn&#8217;t get it: <strong>You have to give permissions to the app otherwise you can read the list title but any item.<\/strong><\/p>\n<p>For giving the app permissions go to the <em>AppManifest.xml<\/em> and add a <strong>area <em>List<\/em><\/strong> with the <strong>permission <em>FullControl<\/em><\/strong>.<\/p>\n<p>Build your project again and start it. You&#8217;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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8217;t mentioned or I didn&#8217;t get it: You have to give &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/tutorials.moedesign.de\/blog\/read-items-from-list-in-sharepoint\/\" class=\"more-link\"><span class=\"screen-reader-text\">\u201eSharepoint AddIn: Read items from a list by code\u201c <\/span>weiterlesen<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-231","post","type-post","status-publish","format-standard","hentry","category-sharepoint"],"_links":{"self":[{"href":"http:\/\/tutorials.moedesign.de\/blog\/wp-json\/wp\/v2\/posts\/231","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/tutorials.moedesign.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/tutorials.moedesign.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/tutorials.moedesign.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/tutorials.moedesign.de\/blog\/wp-json\/wp\/v2\/comments?post=231"}],"version-history":[{"count":0,"href":"http:\/\/tutorials.moedesign.de\/blog\/wp-json\/wp\/v2\/posts\/231\/revisions"}],"wp:attachment":[{"href":"http:\/\/tutorials.moedesign.de\/blog\/wp-json\/wp\/v2\/media?parent=231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/tutorials.moedesign.de\/blog\/wp-json\/wp\/v2\/categories?post=231"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/tutorials.moedesign.de\/blog\/wp-json\/wp\/v2\/tags?post=231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}