An Azure service that provides fine-grained access management for Azure resources, enabling you to grant users only the rights they need to perform their jobs.
Hi,
Community members and moderators can't grant access to your Azure resources. Please ask your subscription Owner or User Access Administrator to assign the role.
There's no built-in role called "App Service Contributor." Your error needs write access to both the App Service plan (serverFarms/write) and the web app (sites/write), so request one of these on the resource group:
- Contributor, or
- Website Contributor + Web Plan Contributor, the least-privilege option. Both are needed, because creating a web app also requires write access to its App Service plan.
The admin can assign them with:
bash
az role assignment create --assignee <user-or-appId> --role "Website Contributor" --scope /subscriptions/<sub-id>/resourceGroups/<rg>
az role assignment create --assignee <user-or-appId> --role "Web Plan Contributor" --scope /subscriptions/<sub-id>/resourceGroups/<rg>
If you deploy from a pipeline, assign the roles to its service principal or managed identity rather than your user account. Once the role is assigned, wait a few minutes and sign in again before retrying.
Reference: Azure built-in roles – Web and Mobile
If this helped, please click "Accept Answer."