AnsweredAssumed Answered

Workflow Error: Failed to fetch an access token from the token service

Question asked by warwick on Jun 4, 2016
Latest reply on Jun 26, 2016 by warwick

Hi, I'm getting this error message on all workflow running in a site collection in Office 365. Other Site Collections are running workflow fine. I've tried deleting and re-adding the Nintex Workflow app manual but same result. This is happening on new and old workflows.

 

Workflow Error Message:

 

Retrying last request. Next attempt scheduled in less than one minute. Details of last request: HTTP  to https://workflowo365.nintex.com/api/ClientArea/Version1/WorkflowAuthentication/Auth Correlation Id:  Instance Id: 0b33383a-6f27-4035-ad94-d8bb0bcea85b

 

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 'e38babee-491d-461a-a512-c37a36731ea2' was not found in the directory 509db05b-bfbb-44b5-9b16-4b7a4578ebc7

Trace ID: f72be93a-7945-48a9-983b-df3ad4fdb245

Correlation ID: 7305e061-65b6-bccb-82e6-768835a72bd1

Timestamp: 2016-06-03 03:31:35Z ---> 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.AuthenticationManager.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)

Outcomes