WorkFlow Manager Exception: Register-SPWorkflowService Failed to query the OAuth S2s metadata error
After completing the installation of workflow manager component on the system, we need to configure it so that it works with SharePoint Farm 2013, to complete this step we should run the following Commands on SharePoint 2013 Management Shell
Register-SPWorkflowService -SPSite ‘https://myhost/mysite’ -WorkflowHostUri ‘http://workflowhost:12991’
But it throws the following error
After investigating and reviewing SharePoint Log Files, I found the following error
Microsoft.Workflow.Client.InvalidRequestException: Failed to query the OAuth S2S metadata endpoint at URI ‘http://×××××××××/_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: 510ac2df-d86a-443d-a45a-f74ce471a45d. NodeId: MU-SPW-D01. Scope: /SharePoint. Client ActivityId : b6023d4e-806b-49b6-ae9f-5da187ab42d8. —> 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)
Actually, this issue may appear for more than reason, but do the following actions to solve your issue
- maybe it trying to connect to SharePoint URL (http://xxxx/_layouts/15/metadata/json/1) and it is not accessible from workflow manager server , in this case you , you should add the SharePoint url to the Workflow manager server host file
- run the below command before running the Register-SPWorkflowService command$config = (Get-SPSecurityTokenServiceConfig)
$config.AllowOAuthOverHttp = $true
$config.AllowMetaDataOverHttp = $true
$config.Update()
WorkFlow Manager 1.0 Configuration Exception
I have been working on SharePoint 2013 project, and one of the requirements is installing and configuring workflow manager, according to our topology design, there is a separate server for workflow manager. The installing started smoothly by running Microsoft Web Platform Installer, workflow manager 1.0 component has been installed successfully, and then I tried to install Cumulative Update for Service Bus 1.0 by using Microsoft Web Platform Installer (to install Cumulative Update 2 for Workflow Manager 1.0 we must install Cumulative Update for Service Bus 1.0), when I started to search about the component using Microsoft Web Platform Installer, it appears Cumulative Update for Service Bus 1.0 already installed ! any way , Cumulative Update 2 for Workflow Manager 1.0 has installed successfully by using Microsoft Web Platform Installer Also . Finally, I started to configure workflow manager farm, create workflow instance databases and configure service bus using workflow manager configuration manager wizard , at first steps everything is fine until “Get Service Bus Client Configuration ” step of the configuration , it thrown the following exception
The remote server returned an error: (400) Bad Request. The api-version in the query string is not supported. Either remove it from the Uri or use one of ‘2012-03’
That issue Looks like a service bus version issue. So you have to ensure that Cumulative Update for Service Bus 1.0 is already installed on this server, try using Microsoft Web Platform Installer or you can download that component directly from Microsoft website http://support.microsoft.com/kb/2799752 then install it . i solved my issue by this way