# SAML Authentication through IIS not working after 8.4 upgrade

**URL:** <https://community.sonarsource.com/t/saml-authentication-through-iis-not-working-after-8-4-upgrade/31189>\
**Category:** SonarQube Server / Community Build\
**Tags:** authentication, saml\
**Created:** [September 14, 2020, 3:30pm UTC](https://community.sonarsource.com/t/saml-authentication-through-iis-not-working-after-8-4-upgrade/31189 "2020-09-14T15:30:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RemiG](https://avatars.discourse-cdn.com/v4/letter/r/eb9ed0/32.png) [@RemiG](https://community.sonarsource.com/u/RemiG)\
**Post date:** [September 14, 2020, 3:30pm UTC](https://community.sonarsource.com/t/saml-authentication-through-iis-not-working-after-8-4-upgrade/31189/1 "2020-09-14T15:30:18Z")

</div>

Hello,

I tried to upgrade SonarQube developer edition from 8.3 edition to 8.4 edition.  
The upgrade seems to be OK except user authentication with SAML.

The error message is :  
“_You’re not authorized to access this page. Please contact the administrator. Reason: The response was received at [http://sonarqube.domain.com:9000/oauth2/callback/saml](http://sonarqube.domain.com:9000/oauth2/callback/saml) instead of [https://sonarqube.domain.com/oauth2/callback/saml](https://sonarqube.domain.com/oauth2/callback/saml)_”

My configuration is :  
Server OS : Windows Server 2019  
Reverse Proxy : IIS with AAR and URL Rewrite modules  
SAML : Microsoft ADFS  
SonarQube Version that works with SAML : 8.3.1  
SonarQube version that does not work with SAML : 8.4.2

I haved followed the tutorial described in “Operating the server” docuementation.  
But since version 8.4, there is this message in the official doc :  
“_Note that the setup described in this blog post is not appropriate for SAML through IIS._”

Is there something to change in IIS config to keep it working with SAML ?

Thanks for your help

Remi

---

<div class="post-metadata">

**Author:** ![julienlancelot](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/julienlancelot/32/68225_2.png) [@julienlancelot](https://community.sonarsource.com/u/julienlancelot)\
**Post date:** [September 17, 2020, 12:21pm UTC](https://community.sonarsource.com/t/saml-authentication-through-iis-not-working-after-8-4-upgrade/31189/3 "2020-09-17T12:21:35Z")

</div>

Hi @RemiG,

I’m not an expert on IIS, but what I can tell you is that you need to set the header **X\_FORWARDED\_PROTO** to **https** , as explained in the _HTTPS Configuration_ section of [https://docs.sonarqube.org/latest/setup/operate-server/](https://docs.sonarqube.org/latest/setup/operate-server/).

I hope it will help you !  
Regards

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [October 27, 2020, 10:28am UTC](https://community.sonarsource.com/t/saml-authentication-through-iis-not-working-after-8-4-upgrade/31189/4 "2020-10-27T10:28:12Z")

</div>

I hope this guide can help you!

> [@SonarQube Users: Let's talk about IIS and SAML Authentication!](https://community.sonarsource.com/t/sonarqube-users-lets-talk-about-iis-and-saml-authentication/33505):
>
> Hey SonarQube Users! When operating a SonarQube instance, the supported way to serve SonarQube over HTTPS is to [secure the server behind a proxy](https://docs.sonarqube.org/latest/setup/operate-server/#header-5). For those who host their SonarQube server on Windows, the reverse proxy of choice is often [IIS](https://www.iis.net/). The intent of this guide is not to elaborate on how to set up a reverse proxy with IIS. There are more than enough IIS gurus out there and tutorials in existence to get you started. The goal is to focus on two tricky, and relatively new requirements to ha…

---

<div class="post-metadata">

**Author:** ![RemiG](https://avatars.discourse-cdn.com/v4/letter/r/eb9ed0/32.png) [@RemiG](https://community.sonarsource.com/u/RemiG)\
**Post date:** [November 2, 2020, 3:17pm UTC](https://community.sonarsource.com/t/saml-authentication-through-iis-not-working-after-8-4-upgrade/31189/5 "2020-11-02T15:17:57Z")

</div>

Hello Colin,

It is working now perfectly with SonarQube 8.5.1.  
The problem was I named my server variable “X\_FORWARDED\_PROTO” instead of “HTTP\_X\_FORWARDED\_PROTO” which is the correct name.

Thanks a lot for your help

Remi

---

<div class="post-metadata">

**Author:** ![byaldira](https://avatars.discourse-cdn.com/v4/letter/b/65b543/32.png) [@byaldira](https://community.sonarsource.com/u/byaldira)\
**Post date:** [November 16, 2020, 2:55pm UTC](https://community.sonarsource.com/t/saml-authentication-through-iis-not-working-after-8-4-upgrade/31189/6 "2020-11-16T14:55:11Z")

</div>

After updating sonarqube, our saml login stopped working, We did it by following your steps, now it works.

The code below has been very useful for us.

%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/proxy -preserveHostHeader:true /commit:apphost
