I have the following:-
- windows server 2012 R2.
- SharePoint server 2016
- 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:-
- I create a new site collection of type team site at
/sites/workflow
to be used as the workflow site collection. 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
.RegisterSPWorkflowService
so i went to central administration >> managed services >> workflow service>>i add the farm account inside the administration group for the service.
then i try to re-run the command, but i got the same error.
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
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.
- add the farm account inside the administration group for the managed service.
- use -AllowOAuthHttp . but seems in my case they did not fix the problem..