Retrieve NameID from Subject within SAMLServiceProvider.ReceiveSSO

Hi

I’m sure this will be a simple one. I’m looking for the opposite of the below answer in that I’m looking to retrieve the value of NameID when it’s passed like the below
https://componentspace.com/Forums/7843/EmployeeID-configuration-under-NameID-or-InitiateSSO

saml:Subject
<saml:NameID Format=“urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified”>50044542</saml:NameID>
<saml:SubjectConfirmation Method=“urn:oasis:names:tc:SAML:2.0:cm:bearer”>
<saml:SubjectConfirmationData Recipient=“<a href=“https://xxx.com/saml/sso.aspx””>https://xxx.com/saml/sso.aspx" NotOnOrAfter=“2019-12-19T13:25:22.815Z” />
</saml:SubjectConfirmation>
</saml:Subject>

Thanks in advance.

The NameID is returned as the userName parameter to the SAMLServiceProvider.ReceiveSSO method.
For example, after the following code executes the userName parameter’s value will be “50044542”.


bool isInResponseTo;
string partnerName;
string authnContext;
string userName;
IDictionary<string, string> attributes;
string relayState;

SAMLServiceProvider.ReceiveSSO(
Request,
out isInResponseTo,
out partnerName,
out authnContext,
out userName,
out attributes,
out relayState);


[quote]
ComponentSpace - 12/19/2019
The NameID is returned as the userName parameter to the SAMLServiceProvider.ReceiveSSO method.
For example, after the following code executes the userName parameter's value will be "50044542".


bool isInResponseTo;
string partnerName;
string authnContext;
string userName;
IDictionary attributes;
string relayState;

SAMLServiceProvider.ReceiveSSO(
Request,
out isInResponseTo,
out partnerName,
out authnContext,
out userName,
out attributes,
out relayState);


[/quote]

That's great. Many thanks for the prompt response.

You’re welcome.