locked
How to display logged on user's "username" in UAG portal. RRS feed

  • Question

  • We noticed that the UAG portal does not show the user which account they are logged in as.  Is there some easy way to show the user which account they have used to login?  This is a problem for us because many times,  we provide different credentials for the same person because of limitations of  the applications we expose.

    It would be great to show <<domainname>>\<<samAccountName>>.  Better yet,  it would be great if we can show the user's first name or last name as configured in Active Directory.

    Thanks.

    -Naraen

    Thursday, July 1, 2010 11:01 PM

Answers

  • Hi Naraen,

    You can use the ASP command servervariables("LOGON_USER") to get the username, and then use Response.write to show it onscreen in one of the UAG's ASP pages. However, this is not a supportable customization, so there is no official document I can provide you. It's not hard, but you should do this at your own risk!


    Ben Ari
    Microsoft CSS UAG/IAG Support
    Sammamish, WA
    • Marked as answer by Erez Benari Sunday, August 22, 2010 10:10 AM
    Sunday, August 22, 2010 10:09 AM

All replies

  • Hi Naraen,

    You can use the ASP command servervariables("LOGON_USER") to get the username, and then use Response.write to show it onscreen in one of the UAG's ASP pages. However, this is not a supportable customization, so there is no official document I can provide you. It's not hard, but you should do this at your own risk!


    Ben Ari
    Microsoft CSS UAG/IAG Support
    Sammamish, WA
    • Marked as answer by Erez Benari Sunday, August 22, 2010 10:10 AM
    Sunday, August 22, 2010 10:09 AM
  • hi,

    Any progress since 2010 on this issue?

    tnx


    roys99

    Monday, April 22, 2013 7:39 AM
  • Here's one way you can show information about the logged on user on Portal pages:

    In [UAG program dir]\von\InternalSite\inc\CustomUpdate\TRUNKNAME1PostPostValidate.inc

    Add the bits you want to show into UAG variable(s):

    <%

    Dim strUAGUser

    set userinfo = GetSessionLeadUser(g_cookie)
    strUAGUser = userinfo.User

    SetSessionParamWithType g_cookie, "Hybrid_WhlStatusFlagX", strUAGUser, "Username"

    %>

    The above example simply takes the username as written By the user into the login form and places it to the variable after the user logs on.

    Then place the contents of that variable into the Portal page of your choice using the AppWrapp mechanism along these lines:

    In [UAG program dir]\von\Conf\WebSites\TRUNKNAME\conf\CustomUpdate\WhlFiltAppWrap_HTTPS.xml

    <MANIPULATION_PER_APPLICATION>
     <APPLICATION_TYPE>Portal</APPLICATION_TYPE>
     
     <DATA_CHANGE>
     <URL case_sensitive="false">.*PortalHomePage/ContentFrame\.aspx.*</URL>
      <SAR>
       <SEARCH encoding="base64">[the part of HTML code that you want to display the info in]</SEARCH>
       <REPLACE encoding="base64" using_variables="true">[the part of HTML code that you want to display the info in]Hybrid_WhlStatusFlagX</REPLACE>
      </SAR>
     </DATA_CHANGE>

    </MANIPULATION_PER_APPLICATION>

    ContentFrame.aspx gives you access to the page that host the app links and icons, other pages like TopFrame.aspx give you obviously other parts of the Portal home page. Find out the Place you want to change with Fiddler or DevTools and try it out. Remember to encode the Search and replace strings to hit exactly what you want.

    HTH,
    Marko

    ---
    Marko Tanttu, Architect
    Microsoft Services Finland
    - Microsoft employee -

    Wednesday, March 12, 2014 12:37 PM