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.

Microsoft 365 and Office | SharePoint Server | For business
Microsoft 365 and Office | SharePoint | Development
Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AllenXu-MSFT 24,951 Reputation points Moderator
    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.


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.