Search code examples
sharepoint-2013workflowsharepoint-workflow

How can I create a workflow action that runs as the admin running it, not the user?


I have an issue and I hope someone helps me solve it. I have two lists, A and B and two users, user1 and user2. User1 has access to list A only, he can't even see list B. User2 has access only to list B. When creating a worflow to let user1 to create an item in list B, it doesn't work because he must have access to modify list B. The admin who is another user have access to all lists. How can I create a workflow action that runs as the admin running it, not the user. Best regards!


Solution

  • You have to create a workflow with elevated permissions by doing the following in the Site Collection site:

    1. Allow the workflow to use add-in permissions.
    2. Grant full control permission to the workflow.
    3. Develop the workflow to wrap actions inside an App Step.

    Read this article for more: https://learn.microsoft.com/en-us/sharepoint/dev/general-development/create-a-workflow-with-elevated-permissions-by-using-the-sharepoint-workflo