We are attempting to set up a plugin for IdentityServer4 for Saml using SustainSys.Saml2. We are getting an error in the log files related to Microsoft.IdentityModel.Tokens.Saml.dll being missing. The file exists in the c:\Identity folder in the container because it is used by IdentityServer4. The version in SystainSys.Saml2 is newer than the version in the Sitecore IdentityServer4. Has anyone else run into this problem?
Integrating the SusyemSys.Saml2 into the identity server has some challenges. I ran into these same issues, but eventually got around them with some pain. Of course, there is a chance I some of the changes I made below could use some improvement, especially with respect to the updated dependencies.
You do need to include updated versions of Microsoft.IdentityModel.Tokens.Saml and Microsoft.IdentityModel.Xml assemblies.
Beyond that, you will also need to update your Sitecore.IdentityServer.Host.deps.json file to reflect the newer assembly versions.
In my case, I put my own identity server plugin, SysteamSys.Saml2.*, Newtonsoft.Json, Microsoft.Extensions.DependencyModel and System.configuration.ConfigurationManager assemblies at the root of the identity server directory.
Hope this helps!