New-DSSession using Windows Authentication

New-DSSession using Windows Authentication

avatar

Hello,  I am trying to establish a session with New-DSSession and Windows authentication.

PS > Get-Module Devolutions.PowerShell | Select Name,Version | fl

Name    : Devolutions.PowerShell
Version : 2026.3.3

PS > $BaseURI = https://devolutions.example.com/dvls

PS > New-DSSession -BaseUri $BaseURI -WindowsAuthentication -Timeout 120
New-DSSession: Could not connect the current user to DVLS. Please see DVLS logs for more details.

The user account I am logged in in Windows is imported into Devolutions Server and I can log in with the same account via the Web interface.

I don't see anything in the "Login attempts" log. Do you have a pointer for me which log to check in DVLS?

Devolutions Server version is 2026.3.7.0.

New-DSSession with the Credentials parameter and the internal DVLSAdmin account works.

Thank you!

Best Regards,

Joachim

All Comments (5)

avatar

Hello @joachimmeyer,

"Login attempts" only records attempts that reach Devolutions Server's login step. Since yours is empty, the request possibly failed earlier, during the Windows handshake between PowerShell and the server. Could you check the following?

1. Windows Authentication in IIS

In IIS Manager, select the Devolutions Server application (under your site) and open "Authentication." Is "Windows Authentication" enabled?

2. Windows login in the web interface

When you log in to the web interface with that account, do you use the Windows / single sign-on option, or do you type your domain username and password? If you type them, please try the Windows sign-on option and tell us if it works.

3. Devolutions Server debug log

  • In the web interface, go to Administration -> Server settings -> Logging, check "Log debug information," and save.

  • Run New-DSSession -BaseUri $BaseURI -WindowsAuthentication again and note the time.

  • On the server, open today's log file in the App_Data folder of the Devolutions Server installation, by default C:\inetpub\wwwroot\dvls\App_Data\DPS_Main<date>.log.

  • Please send us all the lines from around the time of your attempt, especially those containing login-oauth/windows, connect/verify, ValidateVerifyRequestHandler or LoginException. Feel free to replace usernames, IP addresses and host names with placeholders.

  • You can turn debug logging back off afterwards.

Best regards,

Christian

avatar

Hello Christian,

  1. In IIS Manager, under Sites -> Default Web Site -> dvls, Windows Authentication is Enabled and Windows Authentication is also installed.

    PS > Get-WindowsFeature -Name Web-Windows-Auth | Select Name,DisplayName,InstallState | fl
    
    Name         : Web-Windows-Auth
    DisplayName  : Windows Authentication
    InstallState : Installed

    In IIS Manager, under Feature Delegation, Authentication - Windows is also set to Read/Write.

  2. Single-Sign on through the web interface also does not work. The site URL is added to the Local Intranet Zone in the Internet Options.

  3. In the logs I can see that I get an HTTP 401 back.

    2026-11-16 09:19:01.779 +01:00 [DBG] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /dvls/api/accessrequest/all responded 200 in 13.4804 ms
    2026-11-16 09:19:01.780 +01:00 [DBG] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /dvls/api/repository-access-request responded 200 in 13.8568 ms
    2026-11-16 09:19:01.808 +01:00 [DBG] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /dvls/api/connection/server-time/a3461d10-9c96-489a-bdac-086106bf3854 responded 200 in 1.9955 ms
    2026-11-16 09:19:03.075 +01:00 [DBG] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /dvls/api/public-instance-information responded 200 in 36.4737 ms
    2026-11-16 09:19:03.083 +01:00 [DBG] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /dvls/.well-known/openid-configuration responded 200 in 1.2887 ms
    2026-11-16 09:19:03.088 +01:00 [DBG] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /dvls/.well-known/jwks responded 200 in 1.2221 ms
    2026-11-16 09:19:03.339 +01:00 [DBG] Serilog.AspNetCore.RequestLoggingMiddleware HTTP POST /dvls/api/connect/device responded 200 in 239.7498 ms
    2026-11-16 09:19:03.345 +01:00 [DBG] Serilog.AspNetCore.RequestLoggingMiddleware HTTP POST /dvls/api/login-oauth/windows responded 401 in 0.5696 ms
    2026-11-16 09:19:03.411 +01:00 [DBG]  
     Message: Handle Authentication params: user_code: 3274-0342-8791, client_id: powershell, clientVersion: 2026.3.3.0, platform: Windows, login_hint: DOMAIN\adm.t1.j.meyer, is-windows-auth: True
    2026-11-16 09:19:03.412 +01:00 [DBG]  
     Message: WindowsAuthentication failure
    2026-11-16 09:19:03.413 +01:00 [DBG] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /dvls/api/connect/verify?user_code=3274-0342-8791&client_id=powershell&clientVersion=2026.3.3.0&platform=Windows&login_hint=DOMAIN%5Cadm.t1.j.meyer&is-windows-auth=True responded 401 in 28.6497 ms

Thank you!

Best Regards,

Joachim

avatar

Hello @joachimmeyer,

Thanks, that narrows it down. The 401 responses show that IIS is rejecting the Windows sign-in before Devolutions Server can process it. Since single sign-on in the browser fails as well, the cause is in the Windows authentication setup between your client, the server and Active Directory, not in the PowerShell module. In the meantime, New-DSSession -Credential should work.

To find the cause in one go, could you make one more attempt, note the time, and gather the following?

1. Security event log on the Devolutions Server machine

Open Event Viewer, go to Windows Logs > Security, and look for event 4625 (logon failure) at the time of your attempt. Please send its Failure Reason, Status, Sub Status, Logon Type and Authentication Package, or tell us if there is no such event. (If there is no 4625 event, please also run auditpol /get /subcategory:Logon on the server and send us the result, so we know whether failed logons are being recorded.)

2. IIS log for the same attempt

In C:\inetpub\logs\LogFiles\W3SVC1\ (file u_ex<date>.log), please send the lines for POST /dvls/api/login-oauth/windows and GET /dvls/api/connect/verify. We need the status, sub-status and Win32 status columns.

3. A regular user account

Does Windows single sign-on work in the browser for a regular (non-admin) domain user? We ask because the account name adm.t1... suggests a tiered admin model. Admin accounts there are often blocked from network logons to servers outside their tier ("Deny access to this computer from the network"), or are members of the Protected Users group, which blocks NTLM. Either would block Windows authentication while password login keeps working.

4. Kerberos

  • On the client, right after the attempt, run klist and tell us whether a ticket for HTTP/<your Devolutions Server host name> is listed. That is the host name from the URL you pass to -BaseUri.

  • On any domain machine, run setspn -Q HTTP/<that host name> and tell us which account, if any, it is registered on. If that name is an alias (a DNS CNAME) for another server, please also run the same command with the server's real name.

Feel free to replace usernames and host names with placeholders.

Best regards,

Christian

avatar

Hello Christian,

thanks for your reply. 

  1. When I am trying to log on via Microsoft Edge with SSO locally on the DVLS server, I get the following event in the local Security event log:

    PS > Get-WinEvent -FilterHashtable @{ProviderName='Microsoft-Windows-Security-Auditing';Id=4625;} | Select TimeCreated,Id,@{Name='TargetUserName';Expression={$_.Properties[5].Value}},@{Name='Status';Expression={$_.Properties[7].Value}},@{Name='FailureReason';Expression={$_.Properties[8].Value}},@{Name='SubStatus';Expression={$_.Properties[9].Value}},@{Name='LogonType';Expression={$_.Properties[10].Value}},@{Name='AuthenticationPackageName';Expression={$_.Properties[12].Value}} -First 1
    
    TimeCreated               : 18.11.2026 20:19:55
    Id                        : 4625
    TargetUserName            : adm.t1.j.meyer
    Status                    : -1073741715
    FailureReason             : %%2304
    SubStatus                 : 0
    LogonType                 : 3
    AuthenticationPackageName : NTLM
    Failure Reason:  An Error occured during Logon.
    Status:          0xC000006D
    Sub Status:      0x0
  2. In the IIS log, I get HTTP 401 with the following substatus and win32 status:

    sc-status        401
    sc-substatus     1
    sc-win32-status  3221225581

  3. I have tested a bit more and yes you are right, this is an tier 1 administrative account:

    1. When I log on via the browser from the tier 2 client via SSO to DVLS it works. It's just the non-administrative tier 2 account, the administrative tier 1 account does not work with SSO because I cannot log on interactively on the tier 2 client because the logon policy prevents this.

    2. RDM is also using SSO with the tier 2 account and this also works.

    3. Using SSO with the tier 1 admin account does not work locally on the DVLS server.

  4. klist.exe does not show a ticket for HTTP/devolutions.example.com. When I create a SPN for HTTP/devolutions.example.com, RDM cannot connect to DVLS anymore. When I delete the SPN, it works again because it apparently falls back to NTLM. The identity for the app pool "dvls" is a GMSA for which I registered the SPN.

Thank you!

Best Regards,

Joachim

avatar

Hello @joachimmeyer,

Your tier 2 account works, so Devolutions Server itself seems fine. Because there is no working SPN, all Windows logons use NTLM, and the errors you sent (IIS 401.1, event 4625 with NTLM) show NTLM being rejected for your tier 1 account. Setting up Kerberos should let you avoid NTLM entirely.

The SPN broke RDM earlier because IIS validates Kerberos tickets with the computer account by default, not the gMSA. You can try these steps:

1. In IIS Manager, select Sites > Default Web Site > dvls and open Configuration Editor. In the Section drop-down, choose system.webServer > security > authentication > windowsAuthentication, and in the From drop-down choose ApplicationHost.config <location path='Default Web Site/dvls'>. Set useAppPoolCredentials to True and click Apply.

2. Register the SPN HTTP/<your host name> on the gMSA again, and make sure it is on no other account (setspn -Q). Also make sure no other application on that host name uses Windows authentication under a different identity, since that could cause conflicts.

3. Recycle the dvls application pool, run klist purge on your client, and test with RDM (tier 2) and New-DSSession -WindowsAuthentication (tier 1). klist should then show a ticket for HTTP/<your host name>.

Note that this applies to the whole site: all Windows logons, including RDM, will use Kerberos from then on. To undo it, you can remove the SPN first (setspn -D), then set useAppPoolCredentials back to False.

If New-DSSession still fails afterwards, please tell us on which machine you run it with the tier 1 account, whether adm.t1.j.meyer is in the Protected Users group, and send the new 4625 event and IIS log line.

Best regards,

Christian