03/23/2021 16:05:05.18 powershell_ise.exe (0x3BE8) 0x2B8C SharePoint Foundation PowerShell 6tf2 High Microsoft.Workflow.Client.InvalidRequestException: Failed to query the OAuth S2S metadata endpoint at URI 'https://ksi-intranet.knapp.com/_layouts/15/metadata/json/1'. Error details: 'An error occurred while sending the request.'. HTTP headers received from the server - ActivityId: 25506bdb-bedc-4f3a-b614-63ac45c830c7. NodeId: KNLEMOSSAPP04. Scope: /SharePoint. Client ActivityId : bc8e6ba9-b736-4bbc-a277-01835fbf6f44. ---> System.Net.WebException: The remote server returned an error: (400) Bad Request. at Microsoft.Workflow.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) at Microsoft.Workflow.Client.HttpGetResponseAsyncResult`1.End(IAsyncResult result) at Microsoft.Workflow.Client.ClientHelpers.SendRequest[T](HttpWebRequest request, T content) --- End of inner exc... bc8e6ba9-b736-4bbc-a277-01835fbf6f44 03/23/2021 16:05:05.18* powershell_ise.exe (0x3BE8) 0x2B8C SharePoint Foundation PowerShell 6tf2 High ...eption stack trace --- at Microsoft.Workflow.Client.ClientHelpers.SendRequest[T](HttpWebRequest request, T content) at Microsoft.Workflow.Client.WorkflowManagementClient.SendRequest[T](HttpWebRequest request, T content) at Microsoft.Workflow.Client.ScopeManager.PublishScopeInternal(ScopeDescription description, String[] pathSegments) at Microsoft.Workflow.Client.ScopeManager.Publish(ScopeDescription description) at Microsoft.SharePoint.WorkflowServices.WorkflowServerPairingContext.EnsureFarmScope(Boolean configureOAuth) at Microsoft.SharePoint.WorkflowServices.PowerShell.RegisterSPWorkflowService.InternalProcessRecord() at Microsoft.SharePoint.PowerShell.SPCmdlet.ProcessRecord() bc8e6ba9-b736-4bbc-a277-01835fbf6f44 03/23/2021 16:05:05.18 powershell_ise.exe (0x3BE8) 0x2B8C SharePoint Foundation PowerShell 91ux High Error Category: InvalidData Target Object Microsoft.SharePoint.WorkflowServices.PowerShell.RegisterSPWorkflowService Details NULL RecommendedAction NULL bc8e6ba9-b736-4bbc-a277-01835fbf6f44