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