Hi @David V. Corbin ,
You can create a service principal, with the least set of privileges, with the following the command and use the json output to your secrets in your BitBucket yaml script.
az ad sp create-for-rbac --name "myAppDeployAuth" --role contributor \
--scopes /subscriptions/<subscription-id>/resourceGroups/<group-name>/providers/Microsoft.Web/sites/<app-name> \
--sdk-auth
- https://learn.microsoft.com/en-us/azure/app-service/deploy-continuous-deployment?tabs=github#authenticate-by-using-a-service-principal
- https://support.atlassian.com/bitbucket-cloud/docs/deploy-to-microsoft-azure/
---
EDIT: I came across https://learn.microsoft.com/en-us/azure/active-directory/saas-apps/atlassian-cloud-tutorial and think this is what you're referring to. A system managed identity isn't going for work for this use case because only Azure services can use it. What I suggest is creating a user identity per the tutorial and assigning that user identity to you Azure resource. Another option you have is configuring a JWT token that your code running on Azure can use.