@Emil Nenchev , Thanks for posting this question! The error message usually occurs when the Bitbucket account you are trying to use is not properly authorized in Azure.
If you haven't done this already so, to resolve this issue, you can try the following steps:
You may need to check if the token exists and is correctly configured. You can also try to regenerate the token and update the configuration. To regenerate the token, follow these steps:
1. Log in to your Bitbucket account and navigate to the repository you want to deploy.
2. Click on the "Settings" button in the left-hand menu. 3. Click on "Access tokens" in the "Access management" section.
4. Click on the "Create a token" button.
5. Give the token a name and select the appropriate permissions.
6. Click on the "Create" button.
7. Copy the token and save it in a secure location.
To update the configuration in the Azure portal, follow these steps:
1. Navigate to the "Deployment Center" in the Azure portal. 2. Click on the "Settings" button in the left-hand menu. 3. Click on "Source Control" in the "Settings" section.
4. Click on the "Manage tokens" button.
5. Click on the "Add" button.
6. Give the token a name and paste the token value.
7. Click on the "Save" button.
8. Select the repository and branch you want to deploy.
9. Click on the "Save" button. Reference - checkout this document, it's for GitHub/can apply to Bitbucket:
- Investigating continuous deployment · projectkudu/kudu Wiki ·GitHub
- Continuous deployment to Azure App Service
- Kindly let us know, I'll follow-up with you further.