Bypass domain name with credentials SharePoint, .Net site from IIS


Does your Organization have a single Domain and still requires users to pass-in the Domain name in the credentials to login (Domain\userid) ?

There is a way to bypass this through IIS (but only if your organization has a single domain).

We will enable Basic Authentication on our site which is a Challenge-Based authentication mode and will prompt the user to pass their credentials in order to login.

  1. Navigate to your site from IIS.
  2. Click on 'Authentication' under the IIS heading.

  3. Authentication
    Authentication

  4. Right click Basic Authentication --> Enable (Important - This will send the credentials in plain text, so it is recommended to use SSL certificate (TLS) if using this kind of authentication and have an https site).

  5. You can also use different combinations of authentication (say Windows + Forms)

  6. Right click Basic Authentication --> Edit --> Enter the Default domain - This domain will be passed by default and user can pass just the userid

  7. Edit Basic Authentication Settings
    Edit Basic Authentication Settings

  8. Now if you access the SharePoint site URL, you should be able to get in by just passing the User Id and without the domain name.


Though this approach works well, it is advisable to consult your respective network and security team before implementing.



Have Questions? Post them here!






Author Info:

Rakesh (He/Him) has a Masters Degree in Computer Science with over 15+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright Code2care© 2024 | Privacy Policy | About Us | Contact Us | Search