Could someone let us know if it is possible to set up SAML with Episerver and if so do they have any sample code.
We would like to know how to set it up as a IP and SP.
Is Saml 2.0 supported with Episerver?
Episerver does not have built-in support for SAML. But you can use SAML by adding an OWIN authentication middleware, as if it was a regular ASP.Net project. Last time I used SAML in Episerver, I used a NuGet package called Kentor.AuthServices (which is now called Sustainsys.Saml2).
But, if in any way possible, I recommend that you opt for OAuth, OpenID or WS-Federation instead.
I can second that Sustainsys.Saml2 works fine with Epi. Combine https://swapcode.wordpress.com/2018/09/24/using-openid-connect-with-episerver/ and https://github.com/Sustainsys/Saml2/tree/v2/Sustainsys.Saml2.Owin and be sure to work with someone who knows their SAML2 IDP product.