Forum Discussion

thanhtai1789's avatar
thanhtai1789
Icon for Altostratus rankAltostratus
Jul 24, 2022

Set session variable for local user db firstname and lastname

Hi team,

I am new to F5, I am currently setting F5 as custom IDP and here is my access policy (attach files). I want to load user first name and last name (a column in local user db) from local user db and save it into the session after user login success. How would I do it?

Does it work if I try to add Variable Assign step after LocalDB Auth with the entry: session.logon.firstname = expr {[mcget {session.localdb.firstname}]}  ?

Thank you in advance.

5 Replies

      • buulam's avatar
        buulam
        Icon for Admin rankAdmin

        Hi thanhtai1789 I had a look and I'm afraid I don't see first/last name listed as session variables to work with. This is all I got for the localdb related variables in my testing (first/last name parameters were indeed set for this user):

        42c3c3a.session.localdb./Common/ap_localdb_test_act_localdb_auth_ag.result 1 1
        042c3c3a.session.localdb.last.result 1 1
        042c3c3a.session.logon./Common/ap_localdb_test_act_logon_page_ag.logonname 3 buu
        042c3c3a.session.logon./Common/ap_localdb_test_act_logon_page_ag.result 1 1
        042c3c3a.session.logon./Common/ap_localdb_test_act_logon_page_ag.username 3 buu
        042c3c3a.session.logon.last.logonname 3 buu
        042c3c3a.session.logon.last.result 1 1
        042c3c3a.session.logon.last.username 3 buu