If you are going to use “AppOnlySequence” workflow activity in a SP add-in, make sure you follow the below activities in order to grant the required permission by the workflow to execute successfully. If you have missed any of the steps, then the workflow will be suspended with the error “Exception: Access denied. You do not have permission to perform this action or access this resource.”
Enable the feature “Workflows can use app permissions” at site level (site settings -> site actions -> manage site features):
In visual studio open AppManifest.xml and grant the app “Manage” permission.
Tick the option “Allow the app to make app-only calls to SharePoint”
You can also update the raw xml of AppManifest.xml with AllowAppOnlyPolicy=”true” instead of using the VS designer.
<AppPermissionRequest Scope=”http://sharepoint/content/sitecollection/web” Right=”Manage” />