How To Get Workspace Current Logged in User?

Hello All,
I'm trying to create in workspace a link to an external asp page
passing as parameter the logged in user.
I created successfully the link inserting a new MenuItem in WSProduct.xml file,
but I'm able to pass as parameter only the sso_token.
This is the part of my WSProduct.xml:
<MenuItem id="bpm.mnit_ToolsLinksAnalyzer" resourceId="MItem.WebAnalysisStudio" uri="/../WebAnalysis/WebAnalysis.jsp" uriRelativeWebapp="WORKSPACE_WEBAPP" uriMethod="POST" uriWorkspaceParams="sso_token,LOCALE_LANGUAGE">
<Constraints>
          <Role id="BIPLUS_USER"/>
               <Product id="Analyzer"/>
          </Constraints>
</MenuItem>
<MenuItem id="test" resourceId="test" uri="/../test/test.asp" uriRelativeWebapp="WORKSPACE_WEBAPP" uriMethod="POST" uriWorkspaceParams="sso_token,sso_username">
<Constraints>
          <Role id="BIPLUS_USER"/>
               <Product id="Analyzer"/>
</Constraints>
</MenuItem>
with that code, I see the new entry "test" in Tool->Links and I retrieve the sso_token,
but not the sso_username (it return me an empty string). I tried with sso_user, creator_id, but always unsuccessfully.
Any Idea?
Thanks
Gianlu

Just for everyone’s info, this is the script I have used to get the logged in windows username into flash ---- not and air app.
In the html page that publishes with the .swf file under the <head> section:-
<script language="JavaScript" type="text/javascript">
function findUserName() {
     var wshell=new ActiveXObject ("wscript.shell");
     var username=wshell.ExpandEnvironmentStrings("%username%");
     return username;
</script>
The ActionScript:-
import flash.external.ExternalInterface;
var username:String = ExternalInterface.call ("findUserName");
trace (username); // a quick test to see it in output

Similar Messages

  • How to get the current logged in username from windows and put it into an AS var

    Hello,
    I was hopeing someone would know how to get the current logged in username from windows and put it into a var, so I can create a dynamic text box to display it.
    Thanks in advance
    Michael

    Just for everyone’s info, this is the script I have used to get the logged in windows username into flash ---- not and air app.
    In the html page that publishes with the .swf file under the <head> section:-
    <script language="JavaScript" type="text/javascript">
    function findUserName() {
         var wshell=new ActiveXObject ("wscript.shell");
         var username=wshell.ExpandEnvironmentStrings("%username%");
         return username;
    </script>
    The ActionScript:-
    import flash.external.ExternalInterface;
    var username:String = ExternalInterface.call ("findUserName");
    trace (username); // a quick test to see it in output

  • Get the current Logged on User on Mobile Client

    Hi
    I have to display the current logged in User of the Mobile client in my application. I think I have to use the User and UserManager API for that. But the thing is I am not able to instantiate the class to use the methods in it.I think I have to create a session object for using these classes, but in Session API I can see that I will have to create a new session and I want to use the current session.
    Please tell me how to use these APIs and get the instance of User or UserManager.
    Regards,
    Priya

    Hi Priya,
    You can try with:
    User user = UserManager.getInstance().getCurrentUser();
    The User interface has methods to get relevant information (for ie. getName() or getFirstName()), take a look on the [javadocs|http://help.sap.com/javadocs/nwmobile/SP3/laptops/com/sap/ip/me/api/user/User.html]
    Best Regards,
    Simon.

  • How to Get the Current Logged user location ID in SharePoint online

    Hi All ,
    Please suggest me how we can get the SharePoint online current Login user
    Location ID
    Actually i want to show the weather report in my SharePoint online site (App Part in SharePoint Online Site)
    Suppose SPO user Login From India(Delhi) so that i want to show the India(Delhi) weather report
    If Login user from US(dallas) so that US user see the US(dallas) weather report 
    Thanks
    Deepak Chauhan
    SharePoint 2010 & 2013 and Office-365 Branding and Front End Customization, UI Design

    @Mohamed
    Derhalli ,
    Suppose SPO user Login From India(Delhi) so that i want to show the India(Delhi) weather report
    If Login user from US(dallas) so that US user see the US(dallas) weather report
    so without using how we can show the weather report can you please suggest me how we can show the weather report
    Reply ..
    Thanks
    Deepak Chauhan 
    SharePoint 2010 & 2013 and Office-365 Branding and Front End Customization, UI Design

  • How to get list of logged-in users from Flash Media Server in a Flash programm? (Or login/logout notifications)

    Hi there,
    I'm Very sorry for asking this. I guess it's a very basic problem, but I'm very new to Flash and Flash media Server and I need a very fast answer...
    Currently I'm working on a Director project using a flash program which connects to Flash Media Server (I guess version 3, it's quite old). Unfortunately they forgot to make a flash method to send the actual userlist (or a notification when someone logged in or out) to Director. AND, unfortunately, they lost the source code of that flash programm, so I cannot look into it or alter it *sigh*.
    Now I want to do a new flash programm which covers the old one, letting all known methods "pass trough" and building an additional method to gain the user list (or login/out notification).
    How do I get the login information from Flash Media Server? (Would be good if you could provide an idea already for flash code... as I said I'm a tard at flash till now)
    Thank you so much. And I hope you understand my situation asking here...
    Jana

    hparmar : yes, that's what I feared... I hoped it would be possible to tell the server from which application I do need the login information. What a mess.
    Dimo Hristov: thanks for your offer! I already tried decompiling the flash program with the shareware version of Trillix Decompiler. It only decompiled the UI (in a terrible way) but no source code at all. It was the shareware version where I can decompile 2 or 3 programms to test the software. Are you sure the non-free version of Trilix Flash Decompiler will do..?

  • How to get current logged-in user name in data access driver or in universe

    In universe, to get the current log in user is via @Variable('BOUSER').
    Right now, I need to be able to get the user name in the data access driver. I am writing a customized data access driver because we need to patch some where clause on the the query generated by the universe based on the logged-in user info. I only think of using end_sql parameter or adding an universe level filter to patch the @Variable('BOUSER') to the query, which would not work if user want to use customized query.
    Can anyone tell me how to get currentBO user name from connection server ? or how @Variable('BOUSER') is translated into the logged-in user name in the universe?

    I do not know your EJB Service. But you should pass the credentials of the current logged on portal user to your service. That's not by default I think.
    I had a similar problem with CAF developed webservices. I had to turn on permission checks in my web service and passed the credentials via logon ticket.
    Regards, Bernd

  • How to get Current Logged in user in Java

    Hi All ,
    I have written a code in to get the current logged in user in the portal in an EJB service.  I have used the code
    *IUser user= UMFactory.getAuthenticator().getLoggedInUser();*. But surprisingly the userId which it returns is always is Guest. Can you please help on this issue.
    Thanks & Regards,
    Rohit

    I do not know your EJB Service. But you should pass the credentials of the current logged on portal user to your service. That's not by default I think.
    I had a similar problem with CAF developed webservices. I had to turn on permission checks in my web service and passed the credentials via logon ticket.
    Regards, Bernd

  • Currently Logged in User

    Dear Experts
    i would like to know that how can we get the currently logged in user through query or some other option, as i want to generate different document series for every single user.
    Secondly, if i have a party which is my customer as well as my vendor, how i can perform netting so as to get the recievables and payables for the particular party.

    Hi,
    One way to get current logged in user list is through the XML file on the licensing server.  Otherwise, you can get current user by
    Select T0.U_Name From dbo.OUSR T0 Where T0.UserID = $[USER\].
    What is your B1 version and PL? It may not be the same for 2005 or 2007 to handle those BP with both types.
    Thanks,
    Gordon

  • Need query to determine current logged in user

    Because I see no way in sccm 2012 to determine if someone is currently logged into a domain joined computer.  Does anyone have a query or know of a way to get the current logged in user of a computer? I am surprised that SCCM does not show that information
    when looking at the particular device.  I did find a powershell query that I use that tells me the last logged in user but it gives me no indication if the user is currently logged in or if it was a week ago.
    Thank you.

    This PowerShell script queries a remote machine to obtain the current logged on user.  It's available on the Repository (https://gallery.technet.microsoft.com/scriptcenter/d46b1f3b-36a4-4a56-951b-e37815a2df0c).
    function Get-LoggedOnUser {
    #Requires -Version 2.0
    [CmdletBinding()]
    Param
    [Parameter(Mandatory=$true,
    Position=0,
    ValueFromPipeline=$true,
    ValueFromPipelineByPropertyName=$true)]
    [String[]]$ComputerName
    )#End Param
    Begin
    Write-Host "`n Checking Users . . . "
    $i = 0
    }#Begin
    Process
    $ComputerName | Foreach-object {
    $Computer = $_
    try
    $processinfo = @(Get-WmiObject -class win32_process -ComputerName $Computer -EA "Stop")
    if ($processinfo)
    $processinfo | Foreach-Object {$_.GetOwner().User} |
    Where-Object {$_ -ne "NETWORK SERVICE" -and $_ -ne "LOCAL SERVICE" -and $_ -ne "SYSTEM"} |
    Sort-Object -Unique |
    ForEach-Object { New-Object psobject -Property @{Computer=$Computer;LoggedOn=$_} } |
    Select-Object Computer,LoggedOn
    }#If
    catch
    "Cannot find any processes running on $computer" | Out-Host
    }#Forech-object(Comptuters)
    }#Process
    End
    }#End
    }#Get-LoggedOnUser

  • OIM11gr2 - How to get currently logged in user details using oim api

    Hi All,
    I have a requirement to retrieve currently logged in users profile in the process adapter.
    I have tried with getSelfProfile in tcUserOperation and also ContextManager.getOIMUser API's however, in both the cases i am getting xelsysadm details only.
    Also as know request details in Process task mapping doesnot work for OIM11g onwards (its returning column not found exception )
    DOes any one has idea how to achieve this.
    PS. - i am using platform to retrieve API's.
    Thanks & Regards
    Swati Pandey

    You can get the logged in user name using the below java code:
    ADFContext adfCtx = ADFContext.getCurrent();
    SecurityContext secCntx = adfCtx.getSecurityContext();
    String user = secCntx.getUserPrincipal().getName();
    HTH

  • How to get the name of currently logged in user in the network

    Hi all,
    I want to know if there's a way to get the name of the currently logged in user in the network.
    SYS_CONTEXT('USERENV','OS_USER') won't work for me because our users do not loggin in portal.
    Any ideas?
    Thanks in advance.
    Brett

    Hello, I had the same problem. Here is a smaller version to find the Group of the current User.
    The VI get the members of a Group and match it with the Username.
    Note :
    If the User belongs to multiple Groups the the VI returns only the 1st Groupname
    If the User belongs to no Group then the VI returns "unknown Group"
    The VI is written with LabVIEW 2010 and TestStand 4.2.1
    Attachments:
    current user group.vi ‏20 KB
    TestStand get Group of current User.PNG ‏43 KB

  • How to get login of currently logged in user in OIM?

    Hi,
    I am developing JSP in OIM and I would like to obtain data of currently logged in user*, it is possible through getSelfProfile() method ( tcUserOperationsIntf ), so far I have written the following code:
    tcResultSet loggedUser = null;
    tcUtilityFactory utilityFactory = null;
    ConfigurationClient.ComplexSetting myConfig =
    ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
    final Hashtable env = myConfig.getAllSettings();
    tcSignatureMessage moSignature = tcCryptoUtil.sign("xelsysadm", "PrivateKey");
    utilityFactory = new tcUtilityFactory(env, moSignature);
    tcUserOperationsIntf userIntf;
    userIntf = (tcUserOperationsIntf)utilityFactory.getUtility("Thor.API.Operations.tcUserOperationsIntf");
    loggedUser = userIntf.getSelfProfile();
    String userLogin;
    try
    userLogin = loggedUser.getStringValue("Users.User ID");
    System.out.println("User = "+userLogin);
    catch (tcColumnNotFoundException e)
    // TODO
    The problem that this code always returns XELSYSADM, and NOT data for user who is really currently logged in. I think that this is because of the one line on code (marked as bold) where xelsysadm is passed to the moSignature variable. But without this line of code it is impossible (I think so...) to initialize tcUserOperationsIntf and use the getSelfProfile() method... and the circle is closed...
    Had anyone similar scenario?
    Thanks in advance!

    Through the tcUtilityFactory class, you can just use the api getUserName.
    Obviously if you pass the value "xelsysadm" to the line you have bolded, it's always going to use that user for everything. If you login with another user, they need to have permissions to the pieces of oim for the APIs you use. If you use a user search api, they must have permissions to the organization where the users are at.
    -Kevin

  • How to get the Current User on the UI page?

    All,
    Could you please let me know how to get the Current user on the UI input page , i need to display the current user ID when some one clicks the submit button, i want o get the current user to display in the javascript alert box.
    Edited by: 951930 on Oct 24, 2012 12:21 PM

    lucky,
    my schema has already defined for
    <user mapField="USER_ID" default="%CurrentUser"/>
    and in my UI page
    <td oraLabel="user"></td><td oraField="user" id="userId" ></td>
    and my javascript
    function showUserId () {                        
    var curUser = document.getElementById('userId').value;
    alert(curUser);
    and i have called this function on my submit button, but i am not able to get Current Logged User ID value to show in the alert nor able to show the current logged user on the UI page.
    my requirement is on custom UI page i need to show Current Logged User in one corner of the page and also need to show the same user in alert when he submits the button.
    Appreciate for the help.
    Edited by: 951930 on Oct 25, 2012 8:42 AM
    Edited by: 951930 on Oct 25, 2012 9:06 AM

  • How to get the current user logon to portal?

    Hi Gurus,
    How to get the current user who logged into portal.
    I have a webdynpro requirement where in which I have to get the current user id who loggedinto portal which will be the input parameter of the BAPI(adaptive RFC model) which will return me employee number of the particular user.
    Can anyone send me the code to retrive the user id through webdynpro application..........
    Pts will be rewarded for useful inputs......
    Thanks in Advance,
    Dharani

    Hi Dharani,
    Using UMEfactory u can do that...
    1. create one input field,
    2. create one attribute called Uid
    3. assign Uid attribute to the input field
    4. type the following code in Doinit() method
                String uid = wdContext.currentContextElement().getUid();
         try {
         IUser user = UMFactory.getUserFactory().
         getUserByLogonID(uid);
         String userName = user.getDisplayName();
         } catch (UMException ex) {
          e.toString(); 
    5. after that go to Portal create one iview assign to particular user. then u get into the user details...
    thats it
    Regards,
    P.Manivannan

  • How to get the current user name in Provider hosted app using appOnlyAccessToken

    Hi, 
    Please help me, how to get the HostWeb UserName in Provider Hosted App
    i have Provider hosted App, and Anonymous Authentication is enabled on AppWeb, using appOnlyAccessToken
    Below code does not return current user who Log in in hostweb, it is returning
    SharePoint App (app@sharepoint)
    Web web = clientContext.Web;
    clientContext.Load(web);
    clientContext.ExecuteQuery();
    clientContext.Load(web.CurrentUser);
    clientContext.ExecuteQuery();
    clientContext.Web.CurrentUser.LoginName;
    Below code gives a blank name when Anonymous Authentication is enabled, if Anonymous Authentication is disabled
    app prompts for credentials 
    HttpContext.Current.User.Identity.Name
    Thanks
    Ram

    Hi,
    Since you are using a provider Hosted app if you want to get the current logged in name than do not use AppOnlyAccessToken else use AccessToken which is App + user Context AccessToken.
    then 
    Web web = clientContext.Web;
    clientContext.Load(web);
    clientContext.ExecuteQuery();
    clientContext.Load(web.CurrentUser);
    clientContext.ExecuteQuery();
    clientContext.Web.CurrentUser.LoginName;will return proper user Name.
    HttpContext.Current.User.Identity.Name will never return the user as this object is related to IIS server of your App Server not sharepoint.you should set this as Anonymous in case of provider hosted app.you can download the below sample which uses the AccessToken which has user name in it.https://code.msdn.microsoft.com/Working-provider-hosted-8fdf2d95
    Whenever you see a reply and if you think is helpful,Vote As Helpful! And whenever you see a reply being an answer to the question of the thread, click Mark As Answer

Maybe you are looking for