Service Permission errors while creating & assigning the scaling plan to hostpool via ARM Template

New Contributor

Getting the below error while creating & assigning the scaling plan to hostpool via ARM Template

 

New-AzResourceGroupDeployment : 23:27:51 - The deployment 'HostPool' failed with error(s). Showing 1 out of 1 error(s).
Status Message: ActivityId: 9876398c-2590-4ef3-8b3d-ddfe2f446ddb Error: ≤{"error":{"code":"BadRequest","message":"unable to access host pool with resource id
'AVDPHOSTPOOL-1', please make sure that you have given the Azure Virtual Desktop service permissions to access your resource (https://docs.microsoft.com/en-us/azu
re/virtual-desktop/autoscale-scaling-plan#create-a-custom-rbac-role)","target":"/api/scalingPlans/subscriptions/39ee65b9-0633-492d-a68c-c1cbdead1ff3/resourceGroups/AVDPRG-1/scalingPlans/AVDPSCALPLAN-1"}}≥ (Code:400)
CorrelationId: 40c66cb1-3a16-4516-bcc8-808ef51602e1
At line:1 char:1
+ New-AzResourceGroupDeployment -ResourceGroupName "AVDPRG-1" -Templ ...

 

I am found few article to create custom role for AVD via Powershell. but i am trying to achieve it via ARM template. 

 

Is there a way i can add the custom role permission in the scaling plan ARM template . 

Link : https://docs.microsoft.com/en-us/azure/templates/microsoft.desktopvirtualization/scalingplans?tabs=j...

 

 

 

1 Reply
Spoiler
 

@BalajiRanganathan354 Did you ever get this fixed? I am encountering the same error.