<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z000070RJrDCAWOkta Classic EngineSingle Sign-OnAnswered2021-06-13T07:24:12.000Z2021-06-09T13:47:51.000Z2021-06-13T07:24:12.000Z

MihirG.83607 (Customer) asked a question.

Specify username in SAML AuthnRequest

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.


  • User15907066324262507667 (Vendor Management)

    Hello, this is Eusebiu;

     

    From what I am seeing this would be a dev-related question.

     

    To get a better answer, you will need to either reach out to our dev team here: https://devforum.okta.com/ (perhaps your answer is already present in one of the existing threads). Or, if more convenient to you, you can reach out to our support team by opening a ticket, then the ticket will be routed directly to our developer team.

     

     

     

    Thank you!

    Expand Post
This question is closed.
Loading
Specify username in SAML AuthnRequest