CREATING AND MANAGING APPLICATION IDENTITIES

In the previous section you saw how applications have an identity as well as users. When an app takes an action in the context of a user, SharePoint records this information. For example, when a SharePoint list item is created or modified and you later view that list item, you will see the Last Modified and Created information listed as “by My Simple App on behalf of Joe Bloggs,” where My Simple App is the name of the application (application principle) and Joe Bloggs is the name of the user for whom the app made the request. The following activity shows how this works in practice and helps you get started working with application identities by creating a simple application and an associated application identity.

TRY IT OUT: Application Identities (ApplicationIdentity.js)
In this exercise you create a simple SharePoint-hosted application that uses the JavaScript CSOM to talk to SharePoint using the Napa tools in Office 365. You need the Napa application installed from the Office 365 marketplace prior to starting this exercise. You can find the completed code for this exercise in the ApplicationIdentity.js file included with the code download for this chapter.
1. In your SharePoint site create a new Custom list called Gadgets. Do this by clicking in Site Contents, and click Add App. Select Custom List from the list and call it Gadgets. Click Create.
2. Ensure you have Napa Office 365 Development Tools installed in your development ...

Get Beginning SharePoint 2013 Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.