how to fix SharePoint 2019 workflow error - Microsoft.Workflow.Client.AuthenticationException: Authentication Failed

Michel AL HAYEK 187 Reputation points
2023-03-21T08:07:24.7033333+00:00

I have a production farm that is not highly available, consisting of one front-end server (1FED) and one application server (1APPS). I also have a Workflow Manager server. Workflows that were created using SharePoint Designer were working properly, but suddenly, one of the workflows that contain various HTTP request actions to create a subsite and groups encountered an error. The error message indicated that the site was already created as if the create subsite action had timed out, and the workflow was trying to trigger the same action again. After reviewing the ULS logs, I found the only error message: "Microsoft.Workflow.Client.AuthenticationException: Authentication Failed." This workflow fails approximately three times out of ten. I am wondering if increasing the "MaxServiceOperationTimeout" in the Workflow Manager would be helpful, and how to resolve the authentication failure issue.

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,231 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,702 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,676 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.
511 questions
SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,811 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AllenXu-MSFT 16,096 Reputation points Microsoft Vendor
    2023-03-22T02:12:43.45+00:00

    Hi @Michel AL HAYEK,

    Please have a try to below troubleshooting Steps:

    • Check Network connections. (Dont miss this step is very important , Even Some Scenarios it looks working while you can save workflows and Worflow Manager Service looks connected but this issue can happen).
      SharePoint Servers (WFEs) must able to reach Workflow Manager web site.
      And also it is a requirement that from Worflow Manager Machine (if it is a different machine) must able to browse the site url which you use to register-spworkflowservice.
      Ping both machines that have IP communication and also check proxies.
    • If workflow manager is hosted on a different machine check IIS configuration that you have Windows Authentication is enabled.
    • Try re-register workflow service by scopename;
      Register-SPWorkflowService -SPSite http://mywebsite -WorkflowHostUri https://workflowhost -AllowOAuthHttp -scopename “SharePoint”  -Force
    • If it doesnt work ; unregister the Workflow manager from the sharepoint farm
      Get-SPWorkflowServiceApplicationProxy | Remove-SPServiceApplicationProxy
      and run
      Register-SPWorkflowService -SPSite http://mywebsite&#8217 -WorkflowHostUri https://workflowhost&#8217 -AllowOAuthHttp -scopename “SharePoint”  -Force
      this will recreate the SPWorkflowServiceApplication Proxy. Note: Don't Forget make an iisreset after use “Register-SPWorkflowService”.

    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.