none
How to get the user_name in an On-the-fly user logon page? RRS feed

  • Question

  • Hi there,

    We have a bunch of applications configured in UAG, and several of them need step-up biometric authentication to access. We added an On-the-fly user logon page and a step-up authentication server in the UAG trunk, also configured those applications to use that step-up authentication server. 

    The on-the-fly logon page is correctly shown up when I trying to access those applications. I need a way to pre-fill the username field in this on-the-fly logon page, so that user only need to scan their fingerprint. However, I couldn't find a way to get the current logon user_name in that page. I searched the session. It does have variables "user_name0" and "user_name1", but not populated with any value.

    Did I miss something? 

    Thanks for any advice.

    Jeffrey Ai

     

    Wednesday, March 23, 2011 5:46 PM

Answers

  • Hi Jeffrey,

    You can use code like this:

    set LeadUserObj = GetSessionLeadUser(g_cookie)
    LeadUserName = LeadUserObj.User
    set LeadUserObj = Nothing
    

    Regards,


    -Ran
    • Marked as answer by Jeffrey Ai Thursday, March 24, 2011 4:46 PM
    Thursday, March 24, 2011 2:11 PM
  • Hi Jeffrey,

    Getting an email rather than the user name from LeadUserObj.User is expected if the user entered their email/UPN on the UAG login page. However, based on my quick tests, the Domain value should still be populated. These are the attributes available in the LeadUserObj:

    - LeadUserObj.User

    - LeadUserObj.Domain

    - LeadUserObj.Repository

    - LeadUserObj.RepositoryType

    - LeadUserObj.RepositoryBaseType

     Regards,

     


    -Ran
    • Marked as answer by Jeffrey Ai Friday, April 1, 2011 4:19 PM
    Wednesday, March 30, 2011 1:25 PM

All replies

  • Hi Jeffrey,

    You can use code like this:

    set LeadUserObj = GetSessionLeadUser(g_cookie)
    LeadUserName = LeadUserObj.User
    set LeadUserObj = Nothing
    

    Regards,


    -Ran
    • Marked as answer by Jeffrey Ai Thursday, March 24, 2011 4:46 PM
    Thursday, March 24, 2011 2:11 PM
  • That works! Thanks a lot, Ran. You save me days of work.

    BTW, is there a dev guide or doc of UAG that I can find this kind of information?

    Cheers,

    Jeffrey

    Thursday, March 24, 2011 4:48 PM
  • Hi Jeffrey,

    Glad it worked!

    I'm afraid no such dev guide exists.

    Regards,


    -Ran
    Thursday, March 24, 2011 8:48 PM
  • Hi

    Since i haven't done lot customizations i'm not sure where to put that code. Could you give some advice? And also is it possible to pre-fill password also?

    -teemu


    br -teemu
    Tuesday, March 29, 2011 5:58 PM
  • In my case, that piece of code is put in the LoginOnTheFly.asp, which is configured in UAG trunk as the "On-the-fly user logon page". Since this is a step-up authentication using fingerprint, we don't need to pre-fill the password user entered.

     

    Wednesday, March 30, 2011 12:43 AM
  • Hi Ran,

    Somehow, the behavior changed. LeadUserObj.User starts to return the email rather than the user name, and  LeadUserObj.Domain starts to return empty. Do you have any hints for me what could cause that problem? What are the all attributes avaiable in LeadUserObj?

    Thanks,

    Jeffrey

     

    Wednesday, March 30, 2011 2:05 AM
  • Hi Jeffrey,

    Getting an email rather than the user name from LeadUserObj.User is expected if the user entered their email/UPN on the UAG login page. However, based on my quick tests, the Domain value should still be populated. These are the attributes available in the LeadUserObj:

    - LeadUserObj.User

    - LeadUserObj.Domain

    - LeadUserObj.Repository

    - LeadUserObj.RepositoryType

    - LeadUserObj.RepositoryBaseType

     Regards,

     


    -Ran
    • Marked as answer by Jeffrey Ai Friday, April 1, 2011 4:19 PM
    Wednesday, March 30, 2011 1:25 PM
  • Thank you, Ran. That helps a lot.
    Friday, April 1, 2011 4:21 PM
  • Hi everyone,

    Is there a way to do something similar with the certificate. Scenario: user login with a smart card to uag portal, in proces of login some scrip insert into session user name and password from example sql database end user use that credential insted of smart card. I wantto achieve sso if possible because smart card login natively don't support that.

    This post describe problem i wont to solve http://social.technet.microsoft.com/Forums/en-US/forefrontedgeiag/thread/22a80aec-53cc-4990-86e1-ccadefc06fa7
    Monday, September 24, 2012 8:46 AM