# SAML Integration

**URL:** <https://community.f5.com/t/saml-integration/74134>\
**Category:** Technical Forums\
**Tags:** security, application-delivery\
**Created:** [March 6, 2024, 12:06am UTC](https://community.f5.com/t/saml-integration/74134 "2024-03-06T00:06:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nave0010](https://avatars.discourse-cdn.com/v4/letter/n/258eb7/32.png) [@nave0010](https://community.f5.com/u/nave0010)\
**Post date:** [March 6, 2024, 12:06am UTC](https://community.f5.com/t/saml-integration/74134/1 "2024-03-06T00:06:31Z")

</div>

I am having an issue with the SAML configuration. I can access the resources only when I enter the username (AD sAMAccountName) at the Logon Page because then it is storing that value in sAMAccountName variable in AD Query while assigning resources to the users

 ![image_328290.png](https://d20hrnpixdzcsd.cloudfront.net/original/3X/1/5/150fcb55304dbcd18aa9cc6703022498df5fc2fa.png)

Here is the sample policy looks like

 ![image_328290.png](https://d20hrnpixdzcsd.cloudfront.net/original/1X/b92a8a682a8a6f9e1bc0a281a128ba0cccc2ee76.png)

Instead of using sAMAccountName in AD Query I can use UserPrincipalName, but not sure what variable I can use in SearchFilter to use email address entered by the user in the previous SAML window. In order to accomplish that what variable I need to replace with session.login.last.username in the following SearchFilter Code?  
(UserPrincipalName=%{session.login.last.username})

Thanks in advance,
