Forum Discussion

BalajiRanganathan354's avatar
BalajiRanganathan354
Copper Contributor
Mar 03, 2022

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

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=json

 

 

 

    • Am549's avatar
      Am549
      Copper Contributor

      Fliehigh the avd application requires desktop power on off role on the host pool resource group as well as the resource group containing the session hosts.

      Once adding this in it works fine

      • Joshua_Matthews's avatar
        Joshua_Matthews
        Copper Contributor

        Am549  can you provide some more details here? I am stuck on same error.

         

        How do grant AVD roles on the host pool?

Resources