elerch / SAML2

Fork of SAML2 library on codeplex. This library removes dependencies on Asp.net
Mozilla Public License 2.0
117 stars 63 forks source link

Config with Azure AD #18

Open mrochon opened 8 years ago

mrochon commented 8 years ago

I downloaded AAD metadata from: https://nexus.microsoftonline-p.com/federationmetadata/saml20/federationmetadata.xml but following attempt at OWIN config fails with 'Metadata signature could not be verified': var metadata = new XmlDocument() { PreserveWhitespace = true }; metadata.Load(@"C:\Workspaces\Projects\OwinSAML2\OwinSAML2\metadata.xml"); var samlConfig = new SAML2.Config.Saml2Configuration() { ServiceProvider = new SAML2.Config.ServiceProvider() { Id = "https://owinwsfedsample.com", Server = "https://localhost:44381/", }, IdentityProviders = new IdentityProviders(new IdentityProvider[] { new IdentityProvider() { Metadata = new Saml20MetadataDocument(metadata), OmitAssertionSignatureCheck = true } }), AllowedAudienceUris = new List { new Uri("https://owinwsfedsample.com") } };

svrooij commented 8 years ago

If you're using Azure AD why don't you use (the better supported) WS-Federation package?

Or Open-ID connect..... I would recommend using this package only if the identity provider doesn't support some easier way.

zarusz commented 7 years ago

@mrochon did you end up integrating with Azure AD via SAML2.0 and this library?