Azure / powerautomate-avd-starter-kit

Starter kit to help customers integrate with and leverage Azure Virtual Desktop to scale their Power Automate Desktop machine groups
MIT License
51 stars 23 forks source link

Silent Machine Enrollment Add Machine to Machine Group Fails #8

Closed alekmark closed 2 years ago

alekmark commented 2 years ago

Hi @raaourik and Team,

I am trying the runbook script runbookWorkflow.ps1 to enroll machines using automation account and I am getting some errors when running it in GCC. Can you please look into the issue?

When executing PowerShell code: Invoke-Expression "echo "$azureAppSecretn$groupPassword`" | &'$padSilentRegistrationExe' -joinmachinegroup -cloudtype gcc -groupid $GroupId -applicationid $AzureAppId -tenantid $TenantId -environmentid $EnvironmentId -clientsecret -grouppassword | Out-Null"

I am getting the following error Failed The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Error while executing pad install script: Error: Downloading PAD installer to C:\Windows\TEMP\Setup.Microsoft.PowerAutomateDesktop.exe Installing PAD from C:\Windows\TEMP\Setup.Microsoft.PowerAutomateDesktop.exe Registering machine Joining machine group Cleaning up installer at C:\Windows\TEMP\Setup.Microsoft.PowerAutomateDesktop.exe CdsError Error code: 0x80048306. Http status code: Forbidden. Request ids: Correlation id:

alekmark commented 2 years ago

Hello, this issue has been resolved. The Azure Application needs to have System Admin permission to the Dataverse environment that the machines are getting enrolled. One that is in place, the Runbook works as expected.