Windows Virtual Desktop Deployment - Fails at doaminjoin

Copper Contributor

I have been trying to set-up a Windows Virtual Desktop Environment.

 

Following the steps from: http://www.aka.ms/wvddeployment

 

Fails in step 2: wvd-provision-host-pool

 - 

"VM has reported a failure when processing extension 'joindomain'. Error message: \"Exception(s) occured while joining Domain 'xxxxxxxxxxx.onmicrosoft.com'\"\r\n\r\nMore information on troubleshooting is available at https://aka.ms/vmextensionwindowstroubleshoot "

 

4 Replies

@jayantabanerjee can you check if you have correct DNS address specified in the virtual network that will host your host pool virtual machines? also ensure if the DNS or the domain is hosted in other virtual network then your host pool VM's virtual network can communicate to it (you can use vnet peering too).

@bhushangawaleI created the host pool in the same vnet where I have the ADDS.

 

Should it be created on a sperate venet / snet that are peered?

@bhushangawale 

 

OK! It seems the user creds for domain join had an issue after password reset, that issue got resolved.

 

Now there's a second issue: dscextension

 

{
    "status""Failed",
    "error": {
        "code""ResourceDeploymentFailure",
        "message""The resource operation completed with terminal provisioning state 'Failed'.",
        "details": [
            {
                "code""VMExtensionProvisioningError",
                "message""VM has reported a failure when processing extension 'dscextension'. Error message: \"DSC Configuration 'CreateHostPoolAndRegisterSessionHost' completed with error(s). Following are the first few: PowerShell DSC resource MSFT_ScriptResource  failed to execute Test-TargetResource functionality with error message: Windows Virtual Desktop Authentication Failed, Error:\n\r\n\r\nException             : System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: \r\n                        Showing a modal dialog box or form when the application is not running in UserInteractive mode \r\n                        is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to \r\n                        display a notification from a service application.\r\n                           at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Platform.WebUI.<AcquireAuthorizat\r\n                        ionAsync>d__16.MoveNext()\r\n                        --- End of stack trace from previous location where exception was thrown ---\r\n                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n                        task)\r\n                           at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenInteractiveHand\r\n                        ler.<AcquireAuthorizationAsync>d__13.MoveNext()\r\n                        --- End of stack trace from previous location where exception was thrown ---\r\n                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n                        task)\r\n                           at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenInteractiveHand\r\n                        ler.<PreTokenRequestAsync>d__12.MoveNext()\r\n                        --- End of stack trace from previous location where exception was thrown ---\r\n                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n                        task)\r\n                           at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<Ru\r\n                        nAsync>d__58.MoveNext()\r\n                        --- End of stack trace from previous location where exception was thrown ---\r\n                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n                        task)\r\n                           at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.<AcquireTokenCommonA\r\n                        sync>d__40.MoveNext()\r\n                        --- End of stack trace from previous location where exception was thrown ---\r\n                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n                        task)\r\n                           at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.<AcquireTokenAsync>d\r\n                        __30.MoveNext()\r\n                        --- End of stack trace from previous location where exception was thrown ---\r\n                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n                        task)\r\n                           at \r\n                        Microsoft.RDInfra.RDPowershell.Interfaces.AdalHelper.<GetAcquireTokenAsync>d__3.MoveNext() in C:\r\n                        \\agent\\_work\\8\\s\\src\\RDPowershell\\src\\Microsoft.RDInfra.RDPowershell\\Interfaces\\AdalHelper.cs:li\r\n                        ne 126\r\n                        --- End of stack trace from previous location where exception was thrown ---\r\n                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n                        task)\r\n                           at Microsoft.RDInfra.RDPowershell.Context.AddRdsAccount.<>c__DisplayClass6_0.<<BeginProcessin\r\n                        g>b__1>d.MoveNext() in C:\\agent\\_work\\8\\s\\src\\RDPowershell\\src\\Microsoft.RDInfra.RDPowershell\\Co\r\n                        ntext\\AddRdsAccount.cs:line 90\r\n                           --- End of inner exception stack trace ---\r\n                           at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)\r\n                           at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken \r\n                        cancellationToken)\r\n                           at Microsoft.RDInfra.RDPowershell.Context.AddRdsAccount.BeginProcessing() in C:\\agent\\_work\\8\r\n                        \\s\\src\\RDPowershell\\src\\Microsoft.RDInfra.RDPowershell\\Context\\AddRdsAccount.cs:line 90\r\n                           at System.Management.Automation.Cmdlet.DoBeginProcessing()\r\n                           at System.Management.Automation.CommandProcessorBase.DoBegin()\r\n                        ---> (Inner Exception #0) System.InvalidOperationException: Showing a modal dialog box or form \r\n                        when the application is not running in UserInteractive mode is not a valid operation. Specify \r\n                        the ServiceNotification or DefaultDesktopOnly style to display a notification from a service \r\n                        application.\r\n                           at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Platform.WebUI.<AcquireAuthorizat\r\n                        ionAsync>d__16.MoveNext()\r\n                        --- End of stack trace from previous location where exception was thrown ---\r\n                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n                        task)\r\n                           at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenInteractiveHand\r\n                        ler.<AcquireAuthorizationAsync>d__13.MoveNext()\r\n                        --- End of stack trace from previous location where exception was thrown ---\r\n                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n                        task)\r\n                           at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenInteractiveHand\r\n                        ler.<PreTokenRequestAsync>d__12.MoveNext()\r\n                        --- End of stack trace from previous location where exception was thrown ---\r\n                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n                        task)\r\n                           at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<Ru\r\n                        nAsync>d__58.MoveNext()\r\n                        --- End of stack trace from previous location where exception was thrown ---\r\n                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n                        task)\r\n                           at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.<AcquireTokenCommonA\r\n                        sync>d__40.MoveNext()\r\n                        --- End of stack trace from previous location where exception was thrown ---\r\n                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n                        task)\r\n                           at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.<AcquireTokenAsync>d\r\n                        __30.MoveNext()\r\n                        --- End of stack trace from previous location where exception was thrown ---\r\n                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n                        task)\r\n                           at \r\n                        Microsoft.RDInfra.RDPowershell.Interfaces.AdalHelper.<GetAcquireTokenAsync>d__3.MoveNext() in C:\r\n                        \\agent\\_work\\8\\s\\src\\RDPowershell\\src\\Microsoft.RDInfra.RDPowershell\\Interfaces\\AdalHelper.cs:li\r\n                        ne 126\r\n                        --- End of stack trace from previous location where exception was thrown ---\r\n                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n                        task)\r\n                           at Microsoft.RDInfra.RDPowershell.Context.AddRdsAccount.<>c__DisplayClass6_0.<<BeginProcessin\r\n                        g>b__1>d.MoveNext() in C:\\agent\\_work\\8\\s\\src\\RDPowershell\\src\\Microsoft.RDInfra.RDPowershell\\Co\r\n                        ntext\\AddRdsAccount.cs:line 90<---\r\n                        \r\nTargetObject          : \r\nCategoryInfo          : NotSpecified: (:) [Add-RdsAccount], AggregateException\r\nFullyQualifiedErrorId : System.AggregateException,Microsoft.RDInfra.RDPowershell.Context.AddRdsAccount\r\nErrorDetails          : \r\nInvocationInfo        : System.Management.Automation.InvocationInfo\r\nScriptStackTrace      : at AuthenticateRdsAccount, \r\n                        C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.80.0.0\\DSCWork\\Configuration.0\\Functions.ps1: \r\n                        line 270\r\n                        at <ScriptBlock>, C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.80.0.0\\DSCWork\\Configuration.0\\\r\n                        Script-TestHostPoolExists.ps1: line 56\r\n                        at <ScriptBlock>, <No file>: line 23\r\n                        at ScriptExecutionHelper, C:\\windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\PSDesiredStateConfi\r\n                        guration\\DscResources\\MSFT_ScriptResource\\MSFT_ScriptResource.psm1: line 317\r\n                        at Test-TargetResource, C:\\windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\PSDesiredStateConfigu\r\n                        ration\\DscResources\\MSFT_ScriptResource\\MSFT_ScriptResource.psm1: line 209\r\nPipelineIterationInfo : {}\r\nPSMessageDetails      : \r\n\r\n\r\n\r\n  PowerShell DSC resource MSFT_ScriptResource  failed to execute Set-TargetResource functionality with error message: Windows Virtual Desktop Authentication Failed, Error:\n\r\n\r\nException             : System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: \r\n                        Showing a modal dialog box or form when the application is not running in UserInteractive mode \r\n                        is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to \r\n                        display a notification from a service application.\r\n                           at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Platform.WebUI.<AcquireAuthorizat\r\n                        ionAsync>d__16.MoveNext()\r\n                        --- End of stack trace from previous location where exception was thrown ---\r\n                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n                        task)\r\n                           at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenInteractiveHand\r\n                        ler.<AcquireAuthorizationAsync>d__13.MoveNext()\r\n                        --- End of stack trace from previous location where exception was thrown ---\r\n                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n                        task)\r\n                           at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenInteractiveHand\r\n                        ler.<PreTokenRequestAsync>d__12.MoveNext()\r\n                        --- End of stack trace from previous location where exception was thrown ---\r\n                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n                        task)\r\n                           at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<Ru\r\n                        nAsync>d__58.MoveNext()\r\n                        --- End of stack trace from previous location where exception was thrown ---\r\n                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n                        task)\r\n                           at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.<AcquireTokenCommonA\r\n                        sync>d__40.MoveNext()\r\n                        --- End of stack trace from previous location where exception was thrown ---\r\n                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n                        task)\r\n                           at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.<AcquireTokenAsync>d\r\n                        __30.MoveNext()\r\n                        --- End of stack trace from previous location where exception was thrown ---\r\n                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n                        task)\r\n                           at \r\n                        Microsoft.RDInfra.RDPowershell.Interfaces.AdalHelper.<GetAcquireTokenAsync>d__3.MoveNext() in C:\r\n                        \\agent\\_work\\8\\s\\src\\RDPowershell\\src\\Microsoft.RDInfra.RDPowershell\\Interfaces\\AdalHelper.cs:li\r\n                        ne 126\r\n                        --- End of stack trace from previous location where exception was thrown ---\r\n                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n                        task)\r\n                           at Microsoft.RDInfra.RDPowershell.Context.AddRdsAccount.<>c__DisplayClass6_0.<<BeginProcessin\r\n                        g>b__1>d.MoveNext() in C:\\agent\\_work\\8\\s\\src\\RDPowershell\\src\\Microsoft.RDInfra.RDPowershell\\Co\r\n                        ntext\\AddRdsAccount.cs:line 90\r\n                           --- End of inner exception stack trace ---\r\n                           at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)\r\n                           at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken \r\n                        cancellationToken)\r\n                           at Microsoft.RDInfra.RDPowershell.Context.AddRdsAccount.BeginProcessing() in C:\\agent\\_work\\8\r\n                        \\s\\src\\RDPowershell\\src\\Microsoft.RDInfra.RDPowershell\\Context\\AddRdsAccount.cs:line 90\r\n                           at System.Management.Automation.Cmdlet.DoBeginProcessing()\r\n                           at System.Management.Automation.CommandProcessorBase.DoBegin()\r\n                        ---> (Inner Exception #0) System.InvalidOperationException: Showing a modal dialog box or form \r\n                        when the application is not running in UserInteractive mode is not a valid operation. Specify \r\n                        the ServiceNotification or DefaultDesktopOnly style to display a notification from a service \r\n                        application.\r\n                           at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Platform.WebUI.<AcquireAuthorizat\r\n                        ionAsync>d__16.MoveNext()\r\n                        --- End of stack trace from previous location where exception was thrown ---\r\n                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n                        task)\r\n                           at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenInteractiveHand\r\n                        ler.<AcquireAuthorizationAsync>d__13.MoveNext()\r\n                        --- End of stack trace from previous location where exception was thrown ---\r\n                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n                        task)\r\n                           at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenInteractiveHand\r\n                        ler.<PreTokenRequestAsync>d__12.MoveNext()\r\n                        --- End of stack trace from previous location where exception was thrown ---\r\n                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n                        task)\r\n                           at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<Ru\r\n                        nAsync>d__58.MoveNext()\r\n                        --- End of stack trace from previous location where exception was thrown ---\r\n                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n                        task)\r\n                           at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.<AcquireTokenCommonA\r\n                        sync>d__40.MoveNext()\r\n                        --- End of stack trace from previous location where exception was thrown ---\r\n                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n                        task)\r\n                           at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.<AcquireTokenAsync>d\r\n                        __30.MoveNext()\r\n                        --- End of stack trace from previous location where exception was thrown ---\r\n                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n                        task)\r\n                           at \r\n                        Microsoft.RDInfra.RDPowershell.Interfaces.AdalHelper.<GetAcquireTokenAsync>d__3.MoveNext() in C:\r\n                        \\agent\\_work\\8\\s\\src\\RDPowershell\\src\\Microsoft.RDInfra.RDPowershell\\Interfaces\\AdalHelper.cs:li\r\n                        ne 126\r\n                        --- End of stack trace from previous location where exception was thrown ---\r\n                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n                        task)\r\n                           at Microsoft.RDInfra.RDPowershell.Context.AddRdsAccount.<>c__DisplayClass6_0.<<BeginProcessin\r\n                        g>b__1>d.MoveNext() in C:\\agent\\_work\\8\\s\\src\\RDPowershell\\src\\Microsoft.RDInfra.RDPowershell\\Co\r\n                        ntext\\AddRdsAccount.cs:line 90<---\r\n                        \r\nTargetObject          : \r\nCategoryInfo          : NotSpecified: (:) [Add-RdsAccount], AggregateException\r\nFullyQualifiedErrorId : System.AggregateException,Microsoft.RDInfra.RDPowershell.Context.AddRdsAccount\r\nErrorDetails          : \r\nInvocationInfo        : System.Management.Automation.InvocationInfo\r\nScriptStackTrace      : at AuthenticateRdsAccount, \r\n                        C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.80.0.0\\DSCWork\\Configuration.0\\Functions.ps1: \r\n                        line 270\r\n                        at <ScriptBlock>, C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.80.0.0\\DSCWork\\Configuration.0\\\r\n                        Script-RegisterSessionHost.ps1: line 76\r\n                        at <ScriptBlock>, <No file>: line 25\r\n                        at ScriptExecutionHelper, C:\\windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\PSDesiredStateConfi\r\n                        guration\\DscResources\\MSFT_ScriptResource\\MSFT_ScriptResource.psm1: line 317\r\n                        at Set-TargetResource, C:\\windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\PSDesiredStateConfigur\r\n                        ation\\DscResources\\MSFT_ScriptResource\\MSFT_ScriptResource.psm1: line 153\r\nPipelineIterationInfo : {}\r\nPSMessageDetails      : \r\n\r\n\r\n\r\n  The SendConfigurationApply function did not succeed.\"\r\n\r\nMore information on troubleshooting is available at https://aka.ms/VMExtensionDSCWindowsTroubleshoot "
            }
        ]
    }
}

 

 
 
 

Hi @jayantabanerjee,

 

to resolve this issue, you should check your WVD tenant permissions for the user mentioned for deploying! Additionally you can get this error message, if the user you mentioned for the WVD deployment has enabled MFA or if conditional access policies are enabled (everything should be disabled). 

I highly recommend you to use a Service Principal for the deployment. 

This will help you to resolve this issue: https://docs.microsoft.com/en-us/azure/virtual-desktop/create-service-principal-role-powershell