Azure App Service Cannot find SourceControlToken with name GitHub. Deployment to resource group failed. Additional details from the underlying API that might be helpful: At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.
Status message
{
"status": "Failed",
"error": {
"code": "NotFound",
"message": "Cannot find SourceControlToken with name GitHub.",
"details": [
{
"message": "Cannot find SourceControlToken with name GitHub."
},
{
"code": "NotFound"
},
{}
]
}
}
Deployment failed
First off. Make sure that the Azure App Service Creates in Github. Settings -> Third-party Access -> OAuth applications policy
Solution to Cannot find SourceControlToken with name GitHub
It takes time for everything in Azure to be setup up and synchronize. Make some coffee and come back 15min then they’ll have created all the resources and redeploy it. It’ll work.
Troubleshooting
The error message “Cannot find SourceControlToken with name GitHub” typically occurs when you are trying to configure Azure App Service to connect to a GitHub repository, but the Source Control Token for the GitHub account cannot be found or is not configured correctly. Here are some steps you can take to resolve this issue:
- Make sure that you have a GitHub account and that you have created a personal access token for the account. You can create a personal access token by going to your GitHub account settings, selecting “Developer settings,” and then selecting “Personal access tokens.” Make sure that the token has the “repo” scope so that it can access your repositories.
- In the Azure Portal, go to the App Service that you are trying to configure and select “Deployment Center” from the left-hand menu.
- Select “GitHub” as the source control provider and follow the prompts to sign in to your GitHub account.
- When prompted for the Source Control Token, enter the personal access token that you created in step 1.
- If you are still getting the error message, try deleting and recreating the Source Control Token in your GitHub account and then retrying the Azure App Service configuration process.
If you are still unable to resolve the issue, you can try contacting Azure Support for further assistance. Contact Microsoft Azure Support: https://support.microsoft.com/en-us/topic/contact-microsoft-azure-support-2315e669-8b1f-493b-5fb1-d88a8736ffe4