Error Upon Deployment from GitHub template.

%3CLINGO-SUB%20id%3D%22lingo-sub-388747%22%20slang%3D%22en-US%22%3EError%20Upon%20Deployment%20from%20GitHub%20template.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-388747%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3EI've%20just%20tried%20a%20deployment%20of%207%20Server%202016%20session%20hosts%20from%20a%20sysprepped%20Server%202016%20image.%26nbsp%3B%20The%20session%20hosts%20seem%20to%20have%20been%20created%20suceessfully%20and%20joined%20to%20my%20domain%2C%20however%20the%20deployment%20failed.%26nbsp%3B%20The%20failure%20seems%20to%20relate%20to%20this%3A%3C%2FP%3E%3CP%3E%3CSTRONG%3E%26nbsp%3BPowerShell%20DSC%20resource%20MSFT_ScriptResource%20failed%20to%20execute%20Set-TargetResource%20functionality%20with%20error%20message%3A%20User%20is%20not%20authorized%20to%20query%20the%20management%20service.%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EHowever%20I%20am%20using%20the%20correct%20Azure%20credentials%20as%20far%20as%20I%20can%20tell%20and%20it's%20my%20Global%20Admin%20account..%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-388811%22%20slang%3D%22en-US%22%3ERe%3A%20RE%3A%20Error%20Upon%20Deployment%20from%20GitHub%20template.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-388811%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F305698%22%20target%3D%22_blank%22%3E%40rbergertd%3C%2FA%3E%26nbsp%3B%20Thank%20you%20for%20the%20advice%2C%20I%20re-ran%20the%20deployment%20and%20all%20is%20good.%26nbsp%3B%20It's%20not%20impossible%20I%20mistyped%20either%20the%20AAD%20username%20or%20password%20I%20guess.%26nbsp%3B%20All%20good%2C%207%20Server%202016%20session%20hosts%20deployed%20flawlessly%20from%20the%20template%2C%20with%20the%20web%20access%20HTML5%20connection%20working%20perfectly.%26nbsp%3B%20No%20onto%20configuring%20the%20RemoteApps.%26nbsp%3B%20Which%20looks%20fiddly%20at%20the%20moment...%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-388790%22%20slang%3D%22en-US%22%3ERE%3A%20Error%20Upon%20Deployment%20from%20GitHub%20template.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-388790%22%20slang%3D%22en-US%22%3E%3CP%3EIf%20you%20are%20using%20AD%20DS%2C%20make%20sure%20your%20AD%20Connect%20is%20properly%20configured%20and%20syncing%20to%20your%20Azure%20AD.%20Even%20though%20my%20machines%20would%20join%20my%20AD%20DS%20server%20domain%2C%20I%20needed%20to%20configure%2Fenable%20AD%20Connect%20for%20my%20deployment%20to%20successfully%20go%20all%20the%20way%20through.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMore%20info%20that%20may%20help%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FWindows-Virtual-Desktop%2FRequirement-to-have-an-on-prem-AD%2Fm-p%2F386816%23M44%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FWindows-Virtual-Desktop%2FRequirement-to-have-an-on-prem-AD%2Fm-p%2F386816%23M44%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor

Hello,

I've just tried a deployment of 7 Server 2016 session hosts from a sysprepped Server 2016 image.  The session hosts seem to have been created suceessfully and joined to my domain, however the deployment failed.  The failure seems to relate to this:

 PowerShell DSC resource MSFT_ScriptResource failed to execute Set-TargetResource functionality with error message: User is not authorized to query the management service.

However I am using the correct Azure credentials as far as I can tell and it's my Global Admin account..

2 Replies
Highlighted

If you are using AD DS, make sure your AD Connect is properly configured and syncing to your Azure AD. Even though my machines would join my AD DS server domain, I needed to configure/enable AD Connect for my deployment to successfully go all the way through.

 

More info that may help: https://techcommunity.microsoft.com/t5/Windows-Virtual-Desktop/Requirement-to-have-an-on-prem-AD/m-p...

Highlighted

@rbergertd  Thank you for the advice, I re-ran the deployment and all is good.  It's not impossible I mistyped either the AAD username or password I guess.  All good, 7 Server 2016 session hosts deployed flawlessly from the template, with the web access HTML5 connection working perfectly.  No onto configuring the RemoteApps.  Which looks fiddly at the moment...