jitbit / AspNetSaml

Very simple SAML 2.0 consumer module for ASP.NET/C#

Home Page:https://www.jitbit.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Help - Response SAML without NameID

cidmacedo opened this issue · comments

When I redirect do ADFS and user is logged, the adfs call me with this saml without nameID

<samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
ID="_c32e65c3-9480-48f5-a53a-caaf8178ca6e"
Version="2.0"
IssueInstant="2023-07-02T14:25:26Z"
ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
AssertionConsumerServiceURL="xxxxxxxxxxxxxxxxx"
>
<saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">xxxxxxxxxxxxxxx</saml:Issuer>
<samlp:NameIDPolicy Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"
AllowCreate="true"
/>
<samlp:RequestedAuthnContext Comparison="exact">
<saml:AuthnContextClassRef xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml:AuthnContextClassRef>
</samlp:RequestedAuthnContext>
</samlp:AuthnRequest>

How I can get nameID in this case ?

Thanks

You need to set up ADFS so it passes NameID, for example here's how you do it (scroll down to the item "6." https://support.jitbit.com/helpdesk/KB/View/13284380-configuring-saml--in-adfs-