# Help with KeyCloak SAML

**URL:** <https://forum.mautic.org/t/help-with-keycloak-saml/15808>\
**Category:** Product Support\
**Created:** [August 25, 2020, 6:16pm UTC](https://forum.mautic.org/t/help-with-keycloak-saml/15808 "2020-08-25T18:16:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rez0n](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/rez0n/32/1344_2.png) [@rez0n](https://forum.mautic.org/u/rez0n)\
**Post date:** [August 25, 2020, 6:16pm UTC](https://forum.mautic.org/t/help-with-keycloak-saml/15808/1 "2020-08-25T18:16:34Z")

</div>

**Your software**  
My Mautic version is: 3.1.0  
My PHP version is: 7.3

**Your problem**  
My problem is: Can’t properly connect KeyCloak SAML IDP.  
Maybe someone can share IDP metadata file template (and KeyCloak client configuration).  
I’ve getting in my KeyCloak instance this, but it is obv incorrect because isn’t have any auth realms.  
My KeyCloak based on the [auth.myhost.com](http://auth.myhost.com)

```auto
<md:EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" entityID="http://mautic.myhost.com/">
    <md:SPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol" AuthnRequestsSigned="false" WantAssertionsSigned="false">
        <md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="http://mautic.myhost.com/" />
        <md:NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified</md:NameIDFormat>
        <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="http://mautic.myhost.com/s/saml/login_check" isDefault="true" index="1" />
    </md:SPSSODescriptor>
</md:EntityDescriptor>

```

 ![Internal Server Error 2020-08-25 21-11-17](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/4/46a01279e36465e16914d521234dc8a172004f0e.jpeg)  
Thanks.

---

<div class="post-metadata">

**Author:** ![rez0n](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/rez0n/32/1344_2.png) [@rez0n](https://forum.mautic.org/u/rez0n)\
**Post date:** [August 26, 2020, 1:44pm UTC](https://forum.mautic.org/t/help-with-keycloak-saml/15808/2 "2020-08-26T13:44:15Z")

</div>

Seems I have some progress, I found working template and Mautic trying to authenticate user via KeyCloak, but at end I again have an error that not explained in the logs absolutely.  
I enabled debug mode via config/local.php but directory app/logs empty.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/1/198681f430b6f80e062cf331d026bb0825aeae1c.png)

Mautic SAML configuration looks odd and abadoned, seems you need to have a lot of luck in order to set it up. No properly docs, no support at least one SAML provider by default, no logs.

---

<div class="post-metadata">

**Author:** ![yahyarb](https://avatars.discourse-cdn.com/v4/letter/y/3d9bf3/32.png) [@yahyarb](https://forum.mautic.org/u/yahyarb)\
**Post date:** [March 25, 2024, 10:57pm UTC](https://forum.mautic.org/t/help-with-keycloak-saml/15808/3 "2024-03-25T22:57:27Z")

</div>

hey, I’m new to Mautic and I’ve been tasked with integrating it with Keycloak OAuth2 Open Id Connect . Could you please provide guidance or suggest a method to accomplish this? Any help would be greatly appreciated.
