Workflow permission issue when 2010 & 2013 workflows exist for the same list

UnderwoodMarlene-1858 75 Reputation points
2024-10-16T20:19:15.0366667+00:00

Environment: SharePoint 2016 on-premise. SharePoint Workflow Manager. SharePoint Designer 2013.

When users add/change a list item, not all of the workflows are completing. The 2013s get stuck (internal status is started) & keep retrying with the message "The WF error is: unauthorized to <site name>/_api/web/lists(guid'239deb14-cc54-40c7-a02e-e2972fec40ab') Correlation Id: d6184954- fade-9c88-a069-f470a32c8cf9 Instance Id: 16968357-9d08-4dff-955b-f7ec7b3d690f Retry now". The guid is the list. The user has contribute permission to the list item at this point.

There are 3 workflows: 2010 & two 2013s. This seems to only happen when the 2010 workflow runs before the 2013 workflows. The 2010 is used to change the permissions on the list item from contribute to read-only once the item is "closed". The 2013 workflows update other columns in the list and are running using the App Step in case the permissions are changed prior to them running the 2013 workflows.

I am able to cancel the workflows and restart them and they run OK. (I haven't had the user try this yet.) Of course, I have more permissions than the user.

I've had delays in the 2010 workflow before switching to use the App Step and this didn't help.

The same error happens when they close the record. The 2010 runs first & the 2013s get the error & keep retrying.

And if you're wonder, yes, the 2013 workflows re-start the 2010 workflow.

Windows Server 2016
Windows Server 2016
A Microsoft server operating system that supports enterprise-level management updated to data storage.
2,529 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,898 questions
SharePoint Workflow
SharePoint Workflow
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Workflow: An orchestrated and repeatable pattern of business activity, enabling data transformation, service provision, and information retrieval.
606 questions
0 comments No comments
{count} votes

Accepted answer
  1. Xyza Xue_MSFT 25,731 Reputation points Microsoft Vendor
    2024-10-25T06:49:41.7566667+00:00

    Hi @UnderwoodMarlene-1858 ,

    Thank you for posting in this community.

    When you see the error "Multiple User Profiles found with propertyName 'SPS-UserPrincipalName' of specified value," it typically means that there are duplicate user profiles in SharePoint with the same User Principal Name (UPN). Use the User Profile Service Application in Central Administration to identify the duplicate profiles. You can search for the user by their UPN to see if there are multiple entries. If you find duplicate profiles, you can remove the incorrect ones using the User Profile Service Application. Be cautious when deleting profiles to avoid losing important data.After making changes, run a full synchronization of the User Profile Service to ensure that all profiles are updated correctly.

    I'm glad to hear you solve the problem, if you have any issue about SharePoint, you are welcome to raise a ticket in this forum. I would make a brief summary of this thread:

    Current status:

    The issue has been solved. Verify that what went wrong must have been with this particular user. The solution is: Deleted the old User Profile entry using Central Admin & now the workflows are running.

    You could click the "Accept Answer" button for this summary to close this thread, and this can make it easier for other community member's to see the useful information when reading this thread. Thanks for your understanding!



1 additional answer

Sort by: Most helpful
  1. Xyza Xue_MSFT 25,731 Reputation points Microsoft Vendor
    2024-10-17T05:49:43.25+00:00

    Hi @UnderwoodMarlene-1858 ,

    The issue you're experiencing with the SharePoint 2016 environment, When a 2010 workflow changes permissions on a list item, it can affect the execution of subsequent workflows, especially if those workflows are running under different permission contexts. The error message indicates that the 2013 workflows are unable to access the list item due to permission issues.

    Here are some potential solutions to consider:

    1. Check Workflow Permissions: Ensure that the App Step in the 2013 workflows has the necessary permissions to access the list item after the 2010 workflow modifies its permissions.
    2. Workflow Order: Since the issue seems to occur when the 2010 workflow runs before the 2013 workflows, consider adjusting the workflow triggers or conditions to ensure that the 2013 workflows do not start until the 2010 workflow has completed its changes.
    3. Manual Restart: As you mentioned, manually canceling and restarting the workflows allows them to run successfully. This could be a temporary workaround while investigating the root cause.
    4. Review Workflow Manager Configuration: Ensure that the Workflow Manager is properly configured and that the workflows are published correctly. Sometimes, republishing workflows can resolve underlying issues.
    5. Logs and Correlation IDs: Utilize the correlation ID provided in the error message to check the ULS logs for more detailed error information, which can help pinpoint the exact cause of the permission issue.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.