I have the following:-

  1. windows server 2012 R2.
  2. SharePoint server 2016
  3. i install workflow manager 1.0 on the same sharepoint server.

now i want to register the workflow with the sharepoint server, so i did the following:-

  1. I create a new site collection of type team site at /sites/workflow to be used as the workflow site collection.
  2. I run the following command:-

    Register-SPWorkflowService -SPSite "http://server****/sites/workflow" -WorkflowHostUri "http://server****:12291"

but i got this exception:-

Register-SPWorkflowService : Failed to query the OAuth S2S metadata endpoint at URI 'http://server****/sites/workflow/_layouts/15/metadata/json/1'. Error details: 'The metadata endpoint responded with an error. HTTP status code: Forbidden.'. HTTP headers received from the server - ActivityId: 5d48cbb3-bbb6-4df0-9b9c-30fd797f3e12. NodeId: server****. Scope: /SharePoint. Client ActivityId : 494ae29d-f307-20df-99b9-1bf9ffef837a. At line:1 char:1 + Register-SPWorkflowService -SPSite "http://server****/sites/workflow" -WorkflowH ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ + CategoryInfo : InvalidData: (Microsoft.Share...WorkflowService: RegisterSPWorkflowService) [Register-SPWorkflowService], InvalidRequestExc eption + FullyQualifiedErrorId : Microsoft.SharePoint.WorkflowServices.PowerShell

  1. so i went to central administration >> managed services >> workflow service>>i add the farm account inside the administration group for the service.

  2. then i try to re-run the command, but i got the same error.

  3. now i try using -AllowOAuthHttp as follow, but i got the exact error:-

    Register-SPWorkflowService -SPSite "http://server****/sites/workflow" -WorkflowHostUri "http://server****:12291" -AllowOAuthHttp

  4. also when i try to access the following url sites/workflow/_layouts/15/metadata/json/1 i got 403 HTTP error...

so can anyone advice on this.. now all the articles i read about this error contain the above 2 solutions.

  1. add the farm account inside the administration group for the managed service.
  2. use -AllowOAuthHttp . but seems in my case they did not fix the problem..

1 Answer 1


I had this issue in past when configured the workflow manager. In my situation, I ends up doing the following.

  1. I removed the workflow manager service application using this command...Get-SPWorkflowServiceApplicationProxy | Remove-SPServiceApplicationProxy
  2. Now i I run the same register command with -force parameter like this.Register-SPWorkflowService -SPSite "http://server****/sites/workflow" -WorkflowHostUri "http://server****:12291" -AllowOAuthHttp -Force
  • but why do this work? and how can i configure STS?
    – th1rdey3
    Aug 8, 2017 at 3:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.