Search code examples
c#saml-2.0itfoxtec-identity-saml2

How do I generate metadata for SAML 2?


I have a .Net Core service provider web app using the ITfoxtec Identity SAML 2.0 library.

I think I have it 90% working, but I am really very confused about the metadata. Like where do I get it, or how do I generate it.

So I get this error:

System.ArgumentNullException: 'Value cannot be null. (Parameter 'uriString')'

entityDescriptor.ReadSPSsoDescriptorFromUrl(new Uri(configuration["Saml2:samlMetadataUrl"]));

I know it is referring to this part of my appSettings.json file:

"samlMetadataUrl": ""

Where do I get the metadata file from or how can I generate it?

Thanks!


Solution

  • You application can generate RP metadata in the MetadataController. Which is handed to the IdP either as a URL or a file.

    The IdP then give you the IdP metadata which can be configured as a URL or configured manually.