Hi Juan Pablo Delgadillo Martinez,
It looks like the issue is due to an incorrect permission name. Specifically, Microsoft.DesktopVirtualization/escaladoPlanes is incorrect due to a language mismatch. The correct permissions you need to add are:
- Microsoft.DesktopVirtualization/scalingPlans/read
- Microsoft.DesktopVirtualization/scalingPlans/write
- Microsoft.DesktopVirtualization/scalingPlans/delete
- Microsoft.Insights/autoscaleSettings/read
- Microsoft.Insights/autoscaleSettings/write
- Microsoft.Insights/autoscaleSettings/delete
Please ensure these exact permissions are used when creating the custom role. If you continue to encounter issues with PowerShell, you can also try creating the custom role via Azure CLI using the following command:
az role definition create --role-definition '{
"Name": "AVD Scaling Plan Custom Role",
"IsCustom": true,
"Description": "Role for managing AVD scaling plans",
"Actions": [
"Microsoft.DesktopVirtualization/scalingPlans/read",
"Microsoft.DesktopVirtualization/scalingPlans/write",
"Microsoft.DesktopVirtualization/scalingPlans/delete",
"Microsoft.Insights/autoscaleSettings/read",
"Microsoft.Insights/autoscaleSettings/write",
"Microsoft.Insights/autoscaleSettings/delete"
],
"AssignableScopes": ["/subscriptions/YOUR_SUBSCRIPTION_ID"]
}'
Additionally, if you continue to face issues, ensure that your subscription allows for custom role creation and check for any potential Azure policy restrictions.
For more details, refer to these Microsoft documents:
Create and assign an autoscale scaling plan for Azure Virtual Desktop
Create or update Azure custom roles using the Azure portal
If you found the information useful, please click "Upvote" on the post to let us know.