Now I’m ready to deploy the solution. I’m hitting F5 in Visual studio and my app is appearing:

I’m trusting it and … Visual studio is complaining:

Microsoft.SharePoint.Client.ServerUnauthorizedAccessException was unhandled by user code
HResult=-2146233088
Message=Access denied. You do not have permission to perform this action or access this resource.

Hmm, I’m getting an access denied. I did trust the app, so what is wrong. Within the app the permissions needed by the app will need to be supplied.

In my case I’m going to be lazy and I’m giving the app full control on the site collection.