@Omer Jesus Gonzalez Vizcaino Groups cannot be sent as a parameter in Azure Policy. However, you can use the "If" function in the policy definition to conditionally apply the policy based on the list of users.
Here is snippet of policy code.
{
not: {
field: "Microsoft.Authorization/roleAssignments/principalId",
in: "[parameters('principalIds')]"
}
}