The method for assign users to an application group can be found here, this includes the portal, PowerShell and CLI. More details about the ARM template format can be found here. You can try this format to see if it works for you:
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"principalId": {
"type": "string",
"metadata": {
"description": "Specifies the principal ID assigned to the role."
}
},
"roleDefinitionId": {
"type": "string",
"metadata": {
"description": "Specifies the role definition ID used in the role assignment."
}
},
"applicationGroupName": {
"type": "string",
"metadata": {
"description": "Specifies the name of the application group."
}
},
"resourceGroupName": {
"type": "string",
"metadata": {
"description": "Specifies the name of the resource group."
}
}
},
"resources": [
{
"type": "Microsoft.Authorization/roleAssignments",
"apiVersion": "2022-04-01",
"name": "[guid(parameters('principalId'), parameters('roleDefinitionId'), resourceGroup().id)]",
"properties": {
"roleDefinitionId": "[resourceId('Microsoft.Authorization/roleDefinitions', parameters('roleDefinitionId'))]",
"principalId": "[parameters('principalId')]",
"scope": "[resourceId('Microsoft.DesktopVirtualization/applicationGroups', parameters('resourceGroupName'), parameters('applicationGroupName'))]"
}
}
]
}
Hope this helps! Let me know if you still have questions or need further assistance.
If you still have questions, please let us know in the "comments" and we would be happy to help you. Comment is the fastest way of notifying the experts.
If the answer has been helpful, we appreciate hearing from you and would love to help others who may have the same question. Accepting answers helps increase visibility of this question for other members of the Microsoft Q&A community.
Thank you for helping to improve Microsoft Q&A!