We are using Sitecore 10.0 with IdentityServer4 trying to get SustainSys Saml2 to work. SustainSys Saml2 uses Microsoft.Identitymodel.Tokens.Saml 5.2.4 but Sitecore 10 IdentityServer4 uses an outdated Microsoft.Identitymodel.Tokens.Saml 5.2.0 because of a reference to WSFederation 5.2.0. How can I update Sitecore IdentityServer4 to use the 5.2.4 version?
In your scenario, yes you will need to update your
Microsoft.IdentityModel.Xml assemblies to match your version 5.2.4
This of course means you need to ensure
Sitecore.IdentityServer.Host.deps.json is synced to reflect your updated assembly versions.
Please test and verify this works. If not, there is probably more dependent assemblies such as Newtonsoft.Json, Microsoft.Extensions.DependencyModel which you should match the correct versions too.
Please note you need to keep track of which changes you make to default Sitecore Identity Server configuration, should you upgrade in future so that you don't break it again.
Hope this helps.