Windows SSO on IIS and anonymous auth

Windows SSO on IIS and anonymous auth

avatar

Version:  2026.3.4

Host:  IIS


PSU will show as the end user logged via SSO when the visit a page.  However, it will not create an identity if one does not exist.  It will also not process any of the defined role policies.  This does not work even if they have an their windows identity listed in Identities.


Is this expected behavior?  The main driver of having anonymous auth enabled is to allow the VS Code extension connect to the IIS hosted instance.  

All Comments (1)

avatar

Hello Kevin,


Thank you for the clear description of your setup.


No, this is not expected. We ran PowerShell Universal 2026.3.4 in IIS with Windows and Anonymous Authentication both enabled and forwardWindowsAuthToken set to true. A Windows user who had never signed in got an identity on their first request, and a policy role was applied. A user we had added to Identities beforehand, with its role set to Policy, got the same role. An identity given a specific role keeps that role and skips role policies, so please check the role on the identities you listed.


Keeping Anonymous Authentication on is right for the VS Code extension, which connects with an app token. The IIS hosting page says both methods must be enabled to use Windows credentials and app tokens together. Some sections of our documentation say to disable Anonymous Authentication for Windows sign-in. That was not needed in our test, and it would stop app tokens.

https://docs.devolutions.net/powershell-universal/config/hosting/hosting-iis/#windows-authentication


When Windows was not enabled as an authentication method inside PowerShell Universal, the user still reached PSU but no role policy was applied. It may not explain everything you see, but please check that a Windows method is added and enabled in Secure > Authentication.

https://docs.devolutions.net/powershell-universal/security/enterprise-security/windows-sso/


Please also check Limit Identities in Settings > Security. When it is on, a user who is not yet in Identities gets no role, and the log shows the line "User cannot login because it is not a part of the identity table."


If none of these explains it, please send the system log of one user's first visit. By default it is the systemLog file in %ProgramData%\PowerShellUniversal\Logs\System, unless SystemLogPath in appsettings.json points elsewhere. It will show whether PSU evaluated the user's claims, matched a policy role and tried to add the identity. A working sign-in in our test wrote lines like these.


Evaluating claims for <user>

<user> is part of role <role>

<user> is not in the database. Adding identity.


Best regards,

Michel

Michel Audi