4

I have workflow which works correct on a development machine. But on production it throws an error on start.

"Started" status message:

Retrying last request. 
Next attempt scheduled in less than one minute. 
Details of last request: HTTP Unauthorized to
http://teampro3/testissuemanager/_vti_bin/client.svc/sp.utilities.utility.ResolvePrincipalInCurrentcontext(input=@ParamUser,scopes='15',sources='15',inputIsEmailOnly='false',addToUserInfoList='False')?%40ParamUser='i%3A0%23.w%7Ccompany%5Cusername'
Correlation Id: 527e2b06-d43c-452f-8554-656653e683e3 
Instance Id: 95282d99-0e02-4d48-8dab-9b7527809792

"Suspended" status message:

RequestorId: 527e2b06-d43c-452f-0000-000000000000. 
Details: RequestorId: 527e2b06-d43c-452f-0000-000000000000. 
Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.ApplicationException: 
HTTP 401 {"x-ms-diagnostics":["3000006;reason=\"Token contains invalid signature.\";category=\"invalid_client\""],"SPRequestGuid":["527e2b06-d43c-452f-9098-b8e596b2e2ad"],"request-id":["527e2b06-d43c-452f-9098-b8e596b2e2ad"],"X-FRAME-OPTIONS":["SAMEORIGIN"],"SPRequestDuration":["3"],"SPIisLatency":["0"],"Server":["Microsoft-IIS\/8.0"],"WWW-Authenticate":["Bearer realm=\"9bfe48de-e7ca-4d2d-b480-1c1c967d2d3b\",client_id=\"00000003-0000-0ff1-ce00-000000000000\",trusted_issuers=\"00000005-0000-0000-c000-000000000000@*,00000003-0000-0ff1-ce00-000000000000@9bfe48de-e7ca-4d2d-b480-1c1c967d2d3b\"","NTLM"],"X-Powered-By":["ASP.NET"],"MicrosoftSharePointTeamServices":["15.0.0.4420"],"X-Content-Type-Options":["nosniff"],"X-MS-InvokeApp":["1; RequireReadOnly"],"Date":["Mon, 17 Feb 2014 20:06:32 GMT"]} 
at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext context) 
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) 
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

I use not a system account for running workflow.

What could be the problem?

4

I have found out the reason.
I looked through the logs and found this record:

STS Call Claims Saml: Problem getting output claims identity. Exception:
'System.InvalidOperationException: UserProfileApplicationNotAvailableException_Logging :: UserProfileApplicationProxy.ApplicationProperties ProfilePropertyCache does not have 48f52aa1-d094-47da-9dd6-a5b744f3b7a6 --->
Microsoft.Office.Server.UserProfiles.UserProfileApplicationNotAvailableException: UserProfileApplicationNotAvailableException_Logging :: UserProfileApplicationProxy.ApplicationProperties ProfilePropertyCache does not have 48f52aa1-d094-47da-9dd6-a5b744f3b7a6     
at Microsoft.Office.Server.Administration.UserProfileApplicationProxy.get_ApplicationProperties()     
at Microsoft.Office.Server.Administration.UserProfileApplicationProxy.get_ProfileDBSqlSession()     at Microsoft.Office.Server.UserProfiles.UserP...

So the reason is User Profile Service has been stopped.
Now workflow works fine.

3
  1. Goto central admin, Select Web application URL and click on User Policy --> For all required admins,Farm account users provide permissions as all zones with full control.
  2. Go to UserProfile service(Any SA) and select the Permissions option and all above users give the same permissions.
  3. Disable the firewall settings in all Farm servers.
  • yes for me my Service Application was missing various users from the Administrators and also the Permissions list. I just added everything i could think of with full permission and it fixed my problem, not sure which account actually needed it. I did not need to add anything to eh Web Application User Policy in my case ... – TCC Jun 19 '15 at 16:22
2

Just check the ULS logs on your SharePoint server for the correlation ID that is provided in the error message. In my case it revealed:

STS Call: Failed to issue new security token. Exception: System.InvalidOperationException: GetUserProfileByPropertyValue: Multiple User Profiles found with propertyName 'SPS-UserPrincipalName' of specified value

So in other words, the user for which the workflow is being run, which is also shown in the error message from the workflow, had two different profiles due to a move from NTLM to using ADFS. Removing the old user profiles in the SharePoint User Profile Service did the trick for me and got it back to work.

  • I just had the same issue, but it was caused by our service desk not populating the 'user logon name' field when creating user accounts. This meant that a number of accounts had the same 'userPrincipalName' in AD – Nattrass Jul 9 '18 at 13:39
1

In my case reason is:

Profile was not there (For user how is initiating the workflow) in user profile service application.

I have created a profile and workflow started working fine.

0

Another reason this Started "HTTP Unauthorized to http://..." error can exist is that you do not have "User Profile Service Application" service installed. It is auto-installed on most SharePoint installs, but given it's descriptive - "Adds support for My Sites, Profiles pages, Social Tagging and other social computing features. Some of the features offered by this service require Search Service Application and Managed Metadata Services to be provisioned." - one might be excused for not realizing it was also necessary for workflows, too. If, as an admin, you decided that My Sites or Social Tagging were not needed on your site, you might have passed it over, not realizing the workflow consequences.

Solution: Central Admin > Configuration Wizards > Farm Config > Launch > Start > Services > User Profile Service Application (check) > Install

0

Yes. I had an similar error as Volodymyr Machula (cool name by the way). In my case I restarted the User Profile Service. And appearantly, that did the trick.

0

In my case I had put VS workflow activities into AppOnlySequence activity. Adding AllowAppOnlyPolicy="true" in AppManifest.xml resolved the problem.

<AppPermissionRequests AllowAppOnlyPolicy="true">
    <AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web" Right="FullControl" />
  </AppPermissionRequests>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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