If the username box on your SecureAuth IdP login page is already filled in when users arrive, this article explains why and shows how to turn that off.
Overview
Starting with SecureAuth IdP 22.12 hotfix 3, the login page fills in the Username field when the incoming request has a username value in the URL query string. Some apps add this automatically when they send users to SecureAuth for sign-in. For example, Microsoft 365 (WS-Federation) adds &username=user@example.com after the user types their email on the Microsoft sign-in page.
The feature only fills in the field. It doesn't submit the form or skip any authentication steps. Users can still change the value before they continue.
Some organizations prefer that users always type their username. For example, the realm may expect a sAMAccountName while the app sends a UPN or email address. In that case, you can turn the feature off with a web.config setting.
Applies to
| IdP version | Prefill feature | Setting to turn it off |
|---|---|---|
| 22.02 hotfix 10 and later 22.02 hotfixes | Yes (backported) | Yes |
| 22.12 hotfix 3 and hotfix 4 | Yes | No. Upgrade to 22.12 hotfix 5 or later, or use the IIS URL Rewrite workaround below |
| 22.12 hotfix 5 and later | Yes | Yes |
| 23.07 hotfix 1 and later | Yes | Yes |
| 24.04 and later | Yes | Yes |
Prerequisites
- Administrator access to the SecureAuth IdP appliance(s)
- A backup of the web.config file you are about to edit
Steps
1. Open the web.config file
On the IdP server, open the web.config for the realm whose login page you want to change. For example:
D:\SecureAuth\SecureAuth<N>\web.config
2. Add the setting to <appSettings>
Inside the <appSettings> section, add:
<add key="EnableSAMLLoginReqUsernamePrefill" value="False" />
If the key is already there, change its value to False. When the key is missing, the default is True (prefill on).
3. Save the file
Saving web.config makes IIS restart that application automatically. Users who are in the middle of signing in on that realm may need to start over, so make the change during a quiet period.
4. Repeat on every IdP node
In a multi-node (load-balanced) deployment, make the same change on every node. Otherwise the behavior will depend on which node a user reaches.
Verify it worked
- Open the realm URL with a test username in the query string:
https://<your-idp-host>/SecureAuth<N>/?username=testuser - The Username field should now be empty.
- If the field still shows
testuser, confirm that the key is spelled exactly as shown (it is case-sensitive), that it sits inside<appSettings>, and that you edited the correct realm and every node.
To turn prefill back on
Set the value to True or remove the key, then save.
Common issues
- The setting has no effect: the IdP may be on 22.12 hotfix 3 or 4, which has the prefill feature but not this setting. Upgrade to a version listed in the table above. If you can't upgrade yet, use the Remove Username from URL rule in How To: Use IIS URL Rewrite to Redirect, Route and Adjust Realm Traffic. It strips
username=from the URL before the login page loads. - The wrong username format is pre-filled (email instead of sAMAccountName): you can turn prefill off as described above. Alternatively, keep it on and change the realm's data store lookup so it accepts the format the app sends (UPN or email).
Still having issues?
Contact SecureAuth Support with your IdP version, the realm number, and a copy of the <appSettings> section from the affected web.config.
Related articles
- How To: Use IIS URL Rewrite to Redirect, Route and Adjust Realm Traffic. See Remove Username from URL for older versions, and Example 7 for the opposite case: turning on prefill when the SP sends
login_hintinstead ofusername. - How To: Preserve the WSFed Query String Through a SAML Consumer Realm
Comments
0 comments
Please sign in to leave a comment.