Get email form SAML response

what should the path be to get the email address out of the below SAML response?

here is what does not work
/saml2p:Response/saml2:Assertion/saml2:AttributeStatement/saml2:Email/saml2:AttributeValue/text()

<samlp:Response>
    <Assertion>
        <AttributeStatement>
            <Attribute Name="Email">
                <AttributeValue>email@domain.com</AttributeValue>
            </Attribute>
        </AttributeStatement>
    </assertion>
</samlp:Response>

Hi @Jonathan -

Try /Response/Assertion/AttributeStatement/Attribute[@Name='Email']/AttributeValue/text()

If that doesn’t work, DM me the actual SAML response document.

this did the trick

/saml2p:Response/saml2:Assertion/saml2:AttributeStatement/saml2:Attribute[@Name='Email']/saml2:AttributeValue/text()

1 Like