Dec 26, 2013

SharePoint 2013 Work Flow cancelled automatically due to error :HTTP 401 {"error_description":"The server was unable to process the request due to an internal error...}

Hi Guys

Recently I have installed and configured the WorkFlow Manager for my project and i got succeded in doing that. And then I have created a spd workflow and published it, but when I see the history it is saying the workflow is  started but after that it got cancelled automatically by saying this below error

RequestorId: 26f1da47-f3e6-0816-0966-df958cd57c7d. Details: System.ApplicationException: HTTP 401 {"error_description":"The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs."} {"x-ms-diagnostics":["3001000;reason=\"There has been an error authenticating the request.\";category=\"invalid_client\""],"SPRequestGuid":["26f1da47-f3e6-0816-0966-df958cd57c7d"],"request-id":["26f1da47-f3e6-0816-0966-df958cd57c7d"],"X-FRAME-OPTIONS":["SAMEORIGIN"],"SPRequestDuration":["252"],"SPIisLatency":["1"],"Server":["Microsoft-IIS\/8.0"],"WWW-Authenticate":["Bearer realm=\"73b2c214-338d-4c93-937f-5852744a020d\",client_id=\"00000003-0000-0ff1-ce00-000000000000\",trusted_issuers=\"00000005-0000-0000-c000- ---

This issue comes because, the Workflow Manager tries to authenticate SharePoint with the OAuth. Here only the Identity information is passed through the OAuth token. The rest of the information about the user is picked from the User Profile Service Application by the SharePoint.  So the UPS service application should be up and synchronized. 

Follow/Check  these below steps to resolve the issue :

  • First Check the user(  with whom you are publishing the workflow  )should not be a system account
  • Check that the User Profile Synchronization service is running and Full Synchronization is done
  • Make sure that the user with whom you are publishing the workflow should be available in User Profile List. If not add the user by going  this below path  Central Administration--> Manage Service Applications --> Select User Profile Service --> Manage --> Manage User Profiles --> New Profile and then fill the details.

This will resolve your issue..


-Thanks

6 comments:

  1. Still experiencing the issue. User is showing in the user profile, user profile sync is working as per schedule, user has full control. Still workflow gives me the same error. Any idea what else i can check?

    ReplyDelete
    Replies
    1. Did you check, the account which you are publishing is not a system account.? Try to publish the workflow with a user account and check once.

      Delete
  2. This comment has been removed by the author.

    ReplyDelete
  3. same problem...and is not a sys account! :(

    ReplyDelete