In this post we will discuss about App Steps in SharePoint 2013 designer workflow. If you have worked on or if you have used “Impersonation Step” in SharePoint designer 2010 workflow then surly you will need this step. Because “Impersonation Step” is deprecated in SharePoint Designer 2013.
– Web Part Categories missing in SharePoint 2013 or SharePoint 2010
– SharePoint 2016 new features
– SharePoint Server 2016 Installation Step by Step
SharePoint 2013 designer workflow runs under the permissions of the user who published the workflow. But the user may not have permission to do some elevated permissions task. In those cases if you will not use elevated permissions then the workflow will fail. In SharePoint 2010 we can achieve this by using the “Impersonation Step”. But in SharePoint 2013 Impersonation Step is deprecated and the alternate to this, we can use the App Step.
Any actions placed inside an App Step will have Read/Write permissions to all Items in the site. Unlike impersonation step the advantages of App Step is that, we can run the step with elevated permissions at the required position in the workflow rather than having to have the whole workflow.
To use App Step, first we need to activate “Workflows can use app permissions” site feature. This feature allows workflows to read from and write to all items in the site. You can go to Settings -> Site settings. Then in the Site Settings page, click on “Manage site features” under Site Actions section. In the “Site Features” page, search for “Workflows can use app permissions” feature and click on “Activate” if it has not been activated.
In this example, I have one list and when user submit one item into the list, one item will be created in a different list. In the second list only few people will have access. So we have created one SharePoint 2013 list workflow in the first list.
We have used here Create item in List action. We choose here the second list name and the value of Title field we are putting in the second Title list Title. See fig below:
So our workflow looks like below:
Here two different users added an item to the list, First user which has Contribute access to the second list. When this user added an item to the first list, workflow triggers and completed successfully. Also it created one item in the second list.
But when another user added an item to the list, the workflow started but it went to suspended state. Because the user has only read access to the second list.
Now I have changed the workflow and added an App Step and added the Create Item… workflow section inside the App Step. Looks like fig below:
Now when you publish the workflow, it will ask for a confirmation dialog box like below:
“By publishing this workflow, conditions and actions inside App Steps will run using only application credentials. Only continue if this is the intended behavior”. It looks like below:
Then go to the workflow settings and uncheck “Automatically update the workflow status to the current stage name” like below:
Now after this when the user having read access to the second list added one item in the first list, workflow triggers and completed successfully.
Download FREE SharePoint 2019 Installation PDF Guide
This FREE PDF contains, Steps by step guide to install SharePoint 2019 Preview, prerequisites, hardware and software new features. First impression to SharePoint Server 2019 new modern site, modern lists and modern document libraries.