1

Update with additional information.

  • This is not limited to the Send an Email action. No 2013 Workflows work anywhere on this site.

    • I Tried a simple one to set the value of a field. Same error.
  • Wrapping the action in an App Step did not solve my issue.

    • Ensured Workflows can use App Permissions Site Feature is Enabled
    • Granted Full Control for workflows in Site App Permissions as outlined in a response.
  • A 2010 workflow performing the same action to set a value of a field did work.

Original Post Below

I have a site that the ‘Send an Email’ action, simply does not work with a 2013 Workflow. When I review the workflow under: Item – Workflows – Running Workflows, it has an internal status of ‘started’ with the information icon aside of it. When this icon is clicked, I get a long error message (see end of post for the message in it’s entirety). The focal point for me in the message states the following:

System.Net.WebException: The request was aborted: The request was canceled. ---> System.InvalidOperationException: Failed to fetch an access token from the token service. The token service returned an error type of 'unauthorized_client' with the following description: AADSTS70001: Application with identifier 'f83f69d4-ac79-4d90-a785-9df044b97f06' was not found in the directory a544b575-cd97-4b77-9957-2d709aa16a55

This message is received when attempting to build a 2013 workflow on any list within the site.

Troubleshooting steps taken thus far:

  • I Used the ShareGate Migration tool and migrated the list and the associated workflow to another site. The workflow does not generate this error and successfully sends emails.

  • I created a new list with a 2013 workflow with a single action (send an email) in a single stage to email myself. I start the workflow and receive the same error.

  • The parent site does not have this issue.

  • Other sites under the same parent do not have this issue.

  • Creating a 2010 workflow gets around this but I would like to stay with using only 2013 workflows.

Environmental Notes:

  • We are using SharePoint Online.

  • Site was created in 2010 on premise, upgraded to 2013 on premise while running in 2010 mode and then migrated with ShareGate Migration to SharePoint Online.

My testing so far has pointed me in the direction of a site issue and not a list/workflow issue.

Activity in progress

Retrying last request. Next attempt scheduled in less than one minute. Details of last request: HTTP to [My companies site URL]_api/web/lists(guid'0ace938d-d157-4645-9685-82d7a3c4e2b8') Correlation Id: Instance Id: 65f83329-9cb8-4f62-b63f-27cb6a2e79dd

System.Net.WebException: The request was aborted: The request was canceled. ---> System.InvalidOperationException: Failed to fetch an access token from the token service. The token service returned an error type of 'unauthorized_client' with the following description: AADSTS70001: Application with identifier 'f83f69d4-ac79-4d90-a785-9df044b97f06' was not found in the directory a544b575-cd97-4b77-9957-2d709aa16a55 Trace ID: 0981db0d-9d89-4da1-a13d-ab1165afa38c Correlation ID: 49a10622-bd57-05c8-a028-1d40bee29a29 Timestamp: 2017-03-16 17:20:01Z ---> System.Net.WebException: The remote server returned an error: (400) Bad Request. at System.Net.HttpWebRequest.GetResponse() at Microsoft.Activities.Hosting.Security.OAuthS2SSecurityTokenServiceCredential.FetchAccessToken(Uri stsUri, String targetServiceAudience, String authenticatorToken, HttpWebRequest request, TimeSpan timeout, EventTraceActivity eventTraceActivity, TimeSpan& expirationDuration) --- End of inner exception stack trace --- at Microsoft.Activities.Hosting.Security.OAuthS2SSecurityTokenServiceCredential.FetchAccessToken(Uri stsUri, String targetServiceAudience, String authenticatorToken, HttpWebRequest request, TimeSpan timeout, EventTraceActivity eventTraceActivity, TimeSpan& expirationDuration) at Microsoft.Activities.Hosting.Security.OAuthS2SSecurityTokenServiceCredential.GetAccessTokenFromTokenService(OAuthS2SPrincipal client, OAuthS2SPrincipal targetServiceAudience, HttpWebRequest originalRequest, EventTraceActivity eventTraceActivity, TimeSpan& expirationDuration) at Microsoft.Activities.Hosting.Security.OAuthS2SSecurityTokenServiceCredential.GetAuthorization(OAuthS2SAuthenticationChallenge[] bearerChallenges, HttpWebRequest request, EventTraceActivity eventTraceActivity) at Microsoft.Activities.Hosting.Security.OAuthS2SAuthenticationModule.AuthenticateInternal(String challenge, WebRequest request, OAuthS2SCredential credential, EventTraceActivity eventTraceActivity) at Microsoft.Activities.Hosting.Security.OAuthS2SAuthenticationModule.Authenticate(String challenge, WebRequest request, ICredentials credentials) at System.Net.AuthenticationManagerDefault.Authenticate(String challenge, WebRequest request, ICredentials credentials) at System.Net.AuthenticationState.AttemptAuthenticate(HttpWebRequest httpWebRequest, ICredentials authInfo) at System.Net.HttpWebRequest.CheckResubmitForAuth() at System.Net.HttpWebRequest.CheckResubmit(Exception& e, Boolean& disableUpload) at System.Net.HttpWebRequest.DoSubmitRequestProcessing(Exception& exception) at System.Net.HttpWebRequest.ProcessResponse() at System.Net.HttpWebRequest.SetResponse(CoreResponseData coreResponseData) --- End of inner exception stack trace --- at Microsoft.Workflow.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) at Microsoft.Activities.Hosting.HostedHttpExtension.HttpRequestWorkItem.HttpRequestWorkItemAsyncResult.End(IAsyncResult result, Int32& responseCode) at Microsoft.Activities.Hosting.HostedHttpExtension.HttpRequestWorkItem.OnEndComplete(ScheduledWorkItemContext context, IAsyncResult result)

0

Try to develop the Send an Email workflow action inside an App Step.

enter image description here

Note: By default, the workflow doesn’t have permissions to access the list where the Workflows generally run at permission level equivalent to write.So you should also make sure that the Workflow permission has been elevated by doing the following:

  • Allow workflow to use app permissions.
  • Grant full control permission to a workflow.
  • Develop the workflow to wrap actions inside an App Step using SharePoint Designer.

For more details about How to apply the above steps check The Workflow was Suspended with Unauthorized HTTP / elevate Workflow permissions in SharePoint 2013

  • Thank you for your response. I followed the steps outlined in the provided link but I am still receiving the same error as before. Also, it is important to note that the status of my workflow remains as started unlike the issue identified in the article where the status of the workflow is suspended. – GeekOnACycle Mar 17 '17 at 15:05

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.