I wonder if I am the only one getting this CouldnotfetchacccesstokenforAzureStatusCode when deploying(release workflow) from TFS (visualstudio.com) to Azure. Even google doesnt have a clue.
The release workflow profile was set up from within Azure, so I guess the Subscription and Service name are ok. Afterall it manages to get the artifacts transfered. And it HAS been working for a week before it stopped working. It is triggered by a successfull hosted build after a git push. No manual work.
##[section]Finishing: Download Artifacts
##[section]Starting: Deploy Azure App Service
==============================================================================
Task : Azure App Service Deploy
Description : Update Azure App Service using Web Deploy / Kudu REST APIs
Version : 2.1.10
Author : Microsoft Corporation
Help : [More Information](https://aka.ms/azurermwebdeployreadme)
==============================================================================
d19c95a6-ebscrabbeldabbeld9c3eb0cfeb exists true
##[warning]Can\'t find loc string for key: CouldnotfetchacccesstokenforAzureStatusCode
##[error]CouldnotfetchacccesstokenforAzureStatusCode 400 Bad Request
##[section]Finishing: Deploy Azure App Service
##[section]Finishing: Release
I have "Publish using Web Deploy" and "Take App Offline" and the Control Opption "Enabled" checked. The App Service is version 2. Any ideas?
EDIT: Tried version 3(in preview) and I got a different (but probably the same) error:
##[error]Could not fetch acccess token for Azure. Status Code: 400 (Bad Request)
I recreated the service connection as juunas mentioned, and that worked. You will find it under "Services" in TFS. So whats the magic bedhind it:
Thanks for the hint Juunas!
I didn't have to recreate the service connection. I just had to update it and that made the release work again.
Just solved this issue by unlinking all the linked items on the deploy step. So 'Azure Subscription' and 'App Service name', even though they appeared to be set correctly... this got it working for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With