An Azure service that provides streamlined full-stack web app development.
Thanks for reaching out and sharing the exact error message. This is a common Azure RBAC (Role-Based Access Control) issue. The account with object ID af791067-836c-43a3-b61e-6f670ed060a7 currently lacks the permissions needed to work with Azure Static Web Apps in that resource group
Quick Solution
The simplest and most reliable fix is to assign the Contributor role (or Website Contributor for more limited access) to your account at the resource group level:
- Go to the Azure Portal and navigate to your resource group
- In the left menu, select Access control (IAM).
- Click + Add > Add role assignment.
- Choose Contributor (recommended) or Website Contributor.
- On the Members tab, add your user account (or the service principal with the object ID shown in the error).
- Click Review + assign.
After the role is assigned, wait a minute or two (role changes can take a short while to propagate), then sign out and back into the Azure Portal (or run az account clear + az login if you're using the CLI). Try creating the Static Web App again.
Important tip: If the role was granted very recently, the error may persist until you refresh your session — that's why the message suggests refreshing your credentials.
Why This Happens
Creating or even validating a Static Web App requires Microsoft.Web/staticSites/* permissions (including the /read action mentioned in the error). The built-in Contributor and Website Contributor roles include these permissions.
reference
https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles/web-and-mobile
https://learn.microsoft.com/en-us/azure/role-based-access-control/troubleshooting?tabs=bicep
Quickstart: Create a Static Web App in the portal
If the answer is helpful, Please do click "Accept the answer” and Yes, this can be beneficial to other community members.
If you have any other questions, let me know in the "comments" and I would be happy to help you