# Setting up SAML with ADFS

**URL:** https://meta.discourse.org/t/setting-up-saml-with-adfs/141616
**Category:** SSO
**Created:** [February 14, 2020, 3:32pm UTC](https://meta.discourse.org/t/setting-up-saml-with-adfs/141616 "2020-02-14T15:32:56Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![wesochuck](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wesochuck/32/108706_2.png) [@wesochuck](https://meta.discourse.org/u/wesochuck)
#### Post date: [February 14, 2020, 3:32pm UTC](https://meta.discourse.org/t/setting-up-saml-with-adfs/141616/1 "2020-02-14T15:32:56Z")

</div>

We are attempting to use the SAML plugin: [GitHub - discourse/discourse-saml: Support for SAML in Discourse · GitHub](https://github.com/discourse/discourse-saml) to add support for SAML logins with ADFS. However, I don’t seem to be getting very far. I would gladly write up a more details how-to for other folks once I get a better handle on this process.

Currently my biggest issue is I can’t get the “Login with SAML” button to appear.

Here are my more detailed questions about the process:

1. All the SAML setup is done through the app.yml, correct? There are no real /admin settings or changes that are needed or should be used?
2. The SAML settings in app.yml settings should be in the `env:` section?
3. Double quotes (") should be used around the DISCOURSE\_SAML\_CERT\_FINGERPRINT and the DISCOURSE\_SAML\_CERT values in the app.yml?
4. Should DISCOURSE\_SAML\_CERT include the BEGIN/END CERTIFICATE header/footer?
5. Should the certificate DISCOURSE\_SAML\_CERT all be on one line or should there be line breaks?
6. Is the DISCOURSE\_SAML\_AUTO\_CREATE\_ACCOUNT required to be set to TRUE or 1 in order for the login with SAML button to appear? There seemed to be another post on meta that seemed to suggest that it was required.
7. What logs should I be looking at to determine why the button might not be appearing?

Thanks for any assistance. To be clear, we’ve added the plugin, adjusted app.yml settings and rebuilt and it the button isn’t appearing. The plugin does show that it is installed in /admin/plugins so I feel like I’ve got the basics right, but obviously seem to be missing something importantt and I’m not having much luck finding documentation on the process.

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [February 14, 2020, 4:01pm UTC](https://meta.discourse.org/t/setting-up-saml-with-adfs/141616/2 "2020-02-14T16:01:35Z")

</div>

> [@wesochuck](#):
>
> Double quotes (") should be used around the DISCOURSE\_SAML\_CERT\_FINGERPRINT and the DISCOURSE\_SAML\_CERT values in the app.yml?

Yes, that would be a good practice.

> [@wesochuck](#):
>
> Should DISCOURSE\_SAML\_CERT include the BEGIN/END CERTIFICATE header/footer?

No.

> [@wesochuck](#):
>
> Should the certificate DISCOURSE\_SAML\_CERT all be on one line or should there be line breaks?

It should be on a single line. So `DISCOURSE_SAML_CERT="MII...."`

> [@wesochuck](#):
>
> Is the DISCOURSE\_SAML\_AUTO\_CREATE\_ACCOUNT required to be set to TRUE or 1 in order for the login with SAML button to appear?

No.

Now for why the button is not appearing, which keys did you set in the app.yml except for the ones you mention in this post?

---

<div class="post-metadata">

### Author: ![wesochuck](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wesochuck/32/108706_2.png) [@wesochuck](https://meta.discourse.org/u/wesochuck)
#### Post date: [February 14, 2020, 4:08pm UTC](https://meta.discourse.org/t/setting-up-saml-with-adfs/141616/3 "2020-02-14T16:08:40Z")

</div>

Thanks for all the clarifications!

> [@RGJ](#):
>
> which keys did you set in the app.yml except for the ones you mention in this post?

This is a brand new install, just for testing this process, so nothing aside from what ./discourse-setup does. The only other plugin on the system is: docker\_manager

Here is what my Saml plugin setting section looks like:

 ![image](https://global.discourse-cdn.com/meta/original/3X/4/8/4800611451329355257fe1b877b5fe10de34e536.png)

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [February 14, 2020, 4:18pm UTC](https://meta.discourse.org/t/setting-up-saml-with-adfs/141616/4 "2020-02-14T16:18:20Z")

</div>

I just did a quick test, and just the mere presence of the plugin - without any configuration at all - should be sufficient for the button to appear. (Although without configuration it will not be functional of course).

So it seems like your issue is more in the plugin installation.

---

<div class="post-metadata">

### Author: ![wesochuck](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wesochuck/32/108706_2.png) [@wesochuck](https://meta.discourse.org/u/wesochuck)
#### Post date: [February 14, 2020, 4:20pm UTC](https://meta.discourse.org/t/setting-up-saml-with-adfs/141616/5 "2020-02-14T16:20:22Z")

</div>

Interesting, thanks for the information. I might just blow away /var/discourse and start again then.

 ![image](https://global.discourse-cdn.com/meta/original/3X/5/e/5e620decec5ab0439d1f92a9cd912a56da8afb64.png)

Many thanks for all the clarifying points though.

---

<div class="post-metadata">

### Author: ![wesochuck](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wesochuck/32/108706_2.png) [@wesochuck](https://meta.discourse.org/u/wesochuck)
#### Post date: [February 14, 2020, 4:51pm UTC](https://meta.discourse.org/t/setting-up-saml-with-adfs/141616/6 "2020-02-14T16:51:45Z")

</div>

To be clear, the plugin URL would be: [GitHub - discourse/discourse-saml: Support for SAML in Discourse · GitHub](https://github.com/discourse/discourse-saml.git)

---

<div class="post-metadata">

### Author: ![wesochuck](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wesochuck/32/108706_2.png) [@wesochuck](https://meta.discourse.org/u/wesochuck)
#### Post date: [February 14, 2020, 5:10pm UTC](https://meta.discourse.org/t/setting-up-saml-with-adfs/141616/7 "2020-02-14T17:10:55Z")

</div>

@RGJ what versions have you tested the plugin with? After blowing away /var/discourse and rebuilding I am still not seeing a login button. I’ve tried the plugin URL with and without the .git

 ![image](https://global.discourse-cdn.com/meta/original/3X/0/f/0f172893b2e033660f5cd08a936f3b6ce248be6c.png)

If I do a `./launcher enter app`, I see the plugin directory appears to be there:

 ![image](https://global.discourse-cdn.com/meta/original/3X/e/6/e6b70fff126840c53aa77024fe4adf23e622daab.png)

Still no button ☹

 ![image](https://global.discourse-cdn.com/meta/original/3X/a/f/af04b966dca77a63b6a38da664014ac12ab4cfb1.png)

---

<div class="post-metadata">

### Author: ![SantoshKM](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@SantoshKM](https://meta.discourse.org/u/SantoshKM)
#### Post date: [February 14, 2021, 12:31am UTC](https://meta.discourse.org/t/setting-up-saml-with-adfs/141616/8 "2021-02-14T00:31:46Z")

</div>

Dear All, very good morning. I am very new with rather login first time 🙂  
Good to see such a awesome platform.  
Do we have some handy documentation for ADFS integration ?  
Specially step by step what attribute and other parameter we should configure in ADFS as well Discourse

Will be great if someone who is fully aware could help us, thank you so much.
