I'm having a problem setting up a deployment source on an Azure Web App.
Continuous deployment had been setup and was working fine for me before, but currently I can't set up a new deployment any more.
When I attempt to set the Deployment Source for my Web App in the portal: Deployment Center -> Azure Repos -> App Service build service -> choosing my Azure DevOps repo -> Continue -> Finish, it fails with the following error:
Repository 'UpdateSiteSourceControl' operation failed with Microsoft.Web.Hosting.WebHostingException: AADSTS700027: Client assertion contains an invalid signature. [Reason - The key was not found., Thumbprint of key used by client: '############################################']
Trace ID: 02f6d499-09a2-434d-a0cc-8964eca7e300
Correlation ID: cf1039fd-9244-4469-9a2e-740cfc206262
Timestamp: 2019-08-22 09:12:55Z
at Microsoft.Web.Hosting.Security.AADHelper.<HttpPost>d__42.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Web.Hosting.Security.AADHelper.<GetVsoToken>d__36.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Web.Hosting.Administration.VsoSiteRepositoryProvider.<GetAccessToken>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Web.Hosting.Administration.VsoSiteRepositoryProvider.<GetAccountGitEndpoint>d__21.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Web.Hosting.Administration.VsoSiteRepositoryProvider.<UpdateSiteSourceControl>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Web.Hosting.Administration.WebCloudController.<>c__DisplayClass223_1.<<UpdateSiteSourceControl>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Web.Hosting.AsyncHelper.RunSync[TResult](Func`1 func)
at Microsoft.Web.Hosting.Administration.WebCloudController.UpdateSiteSourceControl(String subscriptionName, String webspaceName, String name, SiteSourceControl siteSourceControl).
I tried deleting and recreating the Web App service, but that made no difference.