We are building a saml integration with Okta as service provider.
We are using passport-saml on our side.
I wanted to know how I can pass the username in the SAML AuthnRequest to okta?
I need the username in the okta login screen to be populated based on the parameter I send to the AuthnRequest.
<?xml version="1.0"?>
<samlp:AuthnRequest AssertionConsumerServiceURL="http://localhost:30000/saml/consume" Destination="https://dev-3135214.okta.com/app/dev-3135214_mysamlapp_1/exk2wb8hqSMrxmIVh5d6/sso/saml" ID="_475a864680b9f8743f70" IssueInstant="2021-06-07T04:51:10.630Z" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Version="2.0" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">
<saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">http://www.okta.com/exk2wb8hqSMrxmIVh5d6</saml:Issuer>
<samlp:NameIDPolicy AllowCreate="true" Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"/>
<samlp:RequestedAuthnContext Comparison="exact" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">
<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>
<saml:Subject xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">
<NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress">test@example.com</NameID>
</saml:Subject>
</samlp:AuthnRequest>
I am sending the SAML request in this format. Note the Subject parameter in XML. I dont see the okta login screen use this parameter when sent in the SAML request.