Home > SharePoint 2013, WorkFlow Manager 1.0, WorkFlows > WorkFlow Manager Exception: Register-SPWorkflowService Failed to query the OAuth S2s metadata error

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’

Workflow Manager URL has to be fully qualified server name with appropriate port no

But  it throws the following error

wfman

 

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()
Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: