Get all Groups for current user

Hi I try to get all groups for the current logged on user. This is what I do:
First I try to search with the IGruopSearchFilter to obtain all unique Group IDs. I always get an proxy error by doing this, maybe the query is to much.
Then I want to use the method group.isUserMember(user.getUniqueID() to check whether the user is a member of that group or not.
Is there a better way to obtain all groups for a user (without using a query IGroupSearchFilter)?
Thanks ahead for your help.
Burkhardt

Burkhadrt,
have you tried this?
https://media.sdn.sap.com/javadocs/preNW04/SP2/60_sp2_javadocs/ume/com/sap/security/api/IUser.html#getParentGroups(boolean)
This should give you an iterator for all groups the given user is assigned to.
Hope it helps... and if so:
if (helpful) {
  points++
Regards,
Dominik

Similar Messages

  • How to activate all inactive objects for current user

    Hi
    How to activate all inactive objects for current user ...
    ... I have found a (long winded) way to do this:
    - Environment / Inactive Objects
    - Add to Worklist
    - Display Worklist
    - Select All
    - Activate
    this will open a dialog titled "Inactive Objects for <username>"
    which has the exact functionality I need ... but I can't figure out how to get to this dialog directly - without so many intermediate steps
    the SAP docs repeatedly mention the ability to activate the inactive worklist - but do not mention how
    does anybody know the TCode for this dialog?
    thanks
    ps does the term "mass activation" apply to importing change requests rather than development activation?
    Edited by: FireBean500 on Jun 4, 2010 11:07 PM

    No other way. But usually it's far more simple as all objects are already in our own worklist.
    I wonder why your objects are not already in your worklist, as everytime you create or maintain an object, it is added to your worklist.

  • Get all groups from a regular expression match

    Please help me understand how to use Java regular expressions:
    I have an expression similar to this:
    {noformat}"([^X]+)(X[^X]*)+"{noformat}This should match stuff like "asaasaXdfdfdfXXsdsfd".
    How does one access all the matches for the second group (the second groups has a Kleene operator
    added so it is not really just one group --- but match.groupCount() is always 2)
    Here is roughly the code:
    {noformat}java.util.regex.Pattern pattern = {noformat}{noformat}java.util.regex.Pattern.compile({noformat}{noformat}"([^X]+)(X[^X]*)+",{noformat}{noformat}java.util.regex.Pattern.MULTILINE{noformat}{noformat});{noformat}{noformat}java.util.regex.Matcher matcher = pattern.matcher(text);{noformat}{noformat}matcher.find();{noformat}{noformat}int groupcount = matcher.groupCount();{noformat}
    Also, without matcher.find() I get an illegalStateException .. which I also get if I use matcher.matches() instead
    of matcher.find().
    I am obviously missing something here. There is always at least one "X" in the string so shouldn't that pattern always
    match the whole string? Since there are often multiple X, shouldnt I get a group for each occurrence of X, followed
    by 0 or more other characters?
    {noformat}But when I try to match everything by using "^([^X]+)(X[^X]*)+$" I get an "IllegalStateException: No match available" again.{noformat}
    What is the correct way to do this?
    Edited by: johann_p on May 16, 2008 10:39 AM

    I am sorry I messed this up. Here is a SSCCE:
    import java.util.regex.Pattern;
    import java.util.regex.Matcher;
    class RegExp1 {
        public static void main(String[] args) {
          String testString = "first|aaaa | bbbb\n|cccc|ddddd";
          Pattern pattern = Pattern.compile("^([^|]+)(\\|[^|]*)+$");
          Matcher matcher = pattern.matcher(testString);
          matcher.find();
          int groupcount = matcher.groupCount();
          System.out.println("Found "+groupcount+" groups");
          System.out.println("Matcher: "+matcher);
          for (int i = 1; i <= groupcount; i++) {
            System.out.println("Match "+i+": "+testString.substring(matcher.start(i),matcher.end(i)));
    }I figured out a small bug in my first code that explains some of the exception oddities, but my principal question remains:
    how do I access all the matches that correspond to the second capturing group?
    In the example I would get "first" for Match 1 and "|ddddd" for Match 2, but how do I access all the matches??
    Thank you for your help!

  • Get All Groups from Weblogic

    Hello everyone,
    Well i'm having little problem to get all groups that exists in Weblogic. I already search but the only thing i can get is the groups from the user that is autenticated in the application.
    Best regards,
    Tiago Marques

    See if this helps - http://weblogic-wonders.com/weblogic/2010/11/10/list-users-and-groups-in-weblogic-using-jmx/

  • How to get a list of current users and their transactions code?

    SM04 and AL08 give the list, but its not comprehensive.  in sm04, we have to click the username and select sessions and then a
    new popup comes giving all transactions for the user. 
    I want a list such that each and every transaction corresponding to the user is listed at same time.

    Hi,
    Use the FM TH_LONG_USR_INFO.
    Just give parameter user as * (it means all users, other wise current user)
    It will give ALL transactions for ALL users.
    Regards,
    Amit Mittal.
    Edited by: Amit Mittal on Dec 30, 2009 1:00 PM
    Edited by: Amit Mittal on Dec 30, 2009 1:03 PM

  • How to set DEFAULT GROUP for a user when I create a user manually thru pl/s

    Hi Gurus,
    I am creating portal user accounts and groups thru pl/sql calls to
    portal.wwsec_oid.create_user_entry
    portal.wwsec_api.ADD_USER_TO_LIST
    I didn't find any parameters to set the DEFAULT GROUP for the users. I want to set the default group for all my users. I don't want to do it thru portal. Cuz, We have around 1600 users. Please post a reply if you have some info about how I can set this thru code.
    Thanks
    Raj

    You can achieve that using 'wwsec_api.set_defaultgroup'....

  • Ktpass: failed getting target domain for specified user

    Hi all,
    I am trying to generate keytab file by following document 
    http://docs.oracle.com/cd/E17904_01/doc.1111/e15740/wna.htm#REGADWNA
    relevant section 7.3.2.
    Environment we are using as follows:
    Microsoft windows server 2008
    Command executed :
    ktpass /princ [email protected] /mapuser [email protected] /pass Micro123 /out c:\poc.keytab
    Here NTDS (AD windows service name)
    MSCAD.AE (AD domain name)
    [email protected] (AD user)
    Micro123 (Password)
    c:\poc.keytab (file location)
    while executing display error as response:
    C:\>ktpass /princ [email protected] /mapuser [email protected] /pass Micro123 /out c:\poc.keytab
    Cannot bind to default domain: 0x54b
    ktpass:failed getting target domain for specified user.
    Your assistance in this regard would be highly desirable.
    Regards,
    Syed Waqar

    I don't think you have your principal name defined correctly. 
    It should be in the following format:
    host/[email protected]
    http://technet.microsoft.com/en-us/library/cc753771.aspx
    Paul Bergson
    MVP - Directory Services
    MCITP: Enterprise Administrator
    MCTS, MCT, MCSE, MCSA, Security, BS CSci
    2012, 2008, Vista, 2003, 2000 (Early Achiever), NT4
    Twitter @pbbergs http://blogs.dirteam.com/blogs/paulbergson
    Please no e-mails, any questions should be posted in the NewsGroup.
    This posting is provided AS IS with no warranties, and confers no rights.

  • Get all groups from an AD Server

    Hi everyone,
    I'm trying to get all groups from and AD server.
    Here's how I'm doing it:
    DirContext ctx = new InitialDirContext( (Hashtable<String,String>) env);
              Name n2 = new CompositeName().add(groupsContainer);
              NamingEnumeration<Binding> contentsEnum = ctx.listBindings(n2);
              int i = 1;
              while ( contentsEnum.hasMore() && (i++) < 1000 )
                   Binding binding = contentsEnum.next();
                   groups.add(binding.getName().substring(3));
              return groups; The problem is, I always get an error if I don't restrict the results number to below 1000.
    The error is the following *javax.naming.SizeLimitExceededException: [LDAP: error code 4 - Sizelimit Exceeded];*
    After googling, I found it it's due to a field in the AD Server, that restrict the result number.
    So there is no way that I can obtain all groups without changing that field?
    Regards,
    Nuno.

    Hi Nuno,
    You have to increase the MaxPageSize value at ActiveDirectory level to retrieve results more than 1000. By default the MaxPageSize value is 1000. There is no option other than increasing the MaxPageSize value.
    Thanks & Regards,
    Murali.
    ============

  • Report for getting an oppotunity for current month

    Please tell what can be a filter or function for getting an oppotunity for current month , i have the field as "Opportunity created date" so what function or SQL expression can b eused to get created date = current month's date

    Thanks..i'll do taht
    Edited by: user1074008 on Sep 28, 2010 3:11 AM

  • Usually there is a upgrade path for current users of the software at a reduced price. I dont see anything like that for Lightroom 6. Will I have to pay full price just to upgrade to the new LR6 standalone version???

    Usually there is a upgrade path for current users of the software at a reduced price. I dont see anything like that for Lightroom 6. Will I have to pay full price just to upgrade to the new LR6 standalone version???

    The standalone upgrade is 79 US Dollars.
    Go to Products, select Lightroom 6, click on Buy, select Upgrade instead of Full

  • I want to get desktop path for client user using webutil

    oracle database 11g
    oracle forms 10 g
    client windows
    i want to get desktop path for client user using webutil
    as i want to save file in this path

    To get the user's path to their Desktop is a two step process.  First, you have to echo the %USERPROFILE% to a output file and secondly, read the directory from the output file in to Forms.  The code would look similar to the following:
    /* When-Button-Pressed trigger */
    DECLARE
      v_temp_path VARCHAR2(250);
      v_temp_file VARCHAR2(12) := 'webutil.log';
      f_file Client_Text_IO.File_Type;
    BEGIN
      Client_Host('cmd /c echo %USERPROFILE%\Desktop > c:\'||v_temp_file);
      f_file := Client_Text_Io.FOpen('c:\'||v_temp_file, 'R');
    Client_Text_Io.Get_Line(f_file,v_temp_path);
    Client_Text_Io.FClose(f_file);
       b_dummy := WebUtil_File.Delete_File('C:\'||v_temp_file);
      --At this point, you have the path stored in the v_temp_path variable.
      --You can assign this variable to a block item or reference it directly in your code.
    END;
    When you reference the value of the v_temp_path, don't forget to wrap the value in double-quotes (" ") becuase the path will have spaces.  Since your plan is to write a file to the user's desktop, your call to FOPEN will look  like this:
    f_file := Client_Text_Io.FOpen('"'||v_temp_file||'"','W');
    Hope this helps,
    Craig...

  • Get All group from LCES using Livecycle java API

    Hello ,
    Can anyone told me how i can retrieve all the groups that exist in my livecyle using JAVA API.
    Some method who return all groups ??
    Thanks!

    First Thank you for your answer
    I tried this part
    //Set connection properties required to invoke LiveCycle ES
                Properties connectionProps = new Properties();
                connectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_EJB_ENDPOINT, "jnp://test:1099");
                                                                      connectionProps.setProperty(ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,Service ClientFactoryProperties.DSC_EJB_PROTOCOL);
                connectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE, "JBoss");
                connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, "administrator");
                connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, "password");
                ServiceClientFactory scf = ServiceClientFactory.createInstance(connectionProps);
                DirectoryManager directoryManager = new DirectoryManagerServiceClient(scf);
                PrincipalSearchFilter psf = new PrincipalSearchFilter();
        psf.setPrincipalType(Principal.PRINCIPALTYPE_GROUP);  //Recommended - refines the search to a User or Group
        psf.setRetrieveOnlyActive(); // Recommended - returns only ative users/groups and not obsolete/deleted users/groups
        List<Principal> resultList = directoryManager.findPrincipals(psf);
        System.out.println("Done");
    and when I check the result of my list I find incomprehensible informations.
    So when I debug the code ,  my list  contains little information.
    NB : my LDAP contains hundreds of groups.
    Any suggestion
    Any code Source.

  • LOV in select box based off of the group the current user is in

    Hi,
    I need a drop down to display status codes for a user but it that user is a manager then I only need the approval codes to show up. IE: A user will create a record and slect New, Pending Approval, Inprocess and Completed. A manager will see the coes to Approve or Reject. At least that's what I need to happen.
    I have been trying to do something like this in a selection list(drop down) in it's LOV section:
    DECLARE
    VAL BOOLEAN;
    BEGIN
    VAL := APEX_UTIL.CURRENT_USER_IN_GROUP(p_group_name=>'Managers');
    if VAL = true then
    select CODE display_value, STATUS_CODE_ID return_value
    from STATUS_CODES
    where STATUS_CODE_ID in (3, 4)
    order by 1;
    else
    select CODE display_value, STATUS_CODE_ID return_value
    from STATUS_CODES
    where STATUS_CODE_ID in (1, 2, 5, 6, 7, 8)
    order by 1;
    end if;
    END;
    When I run the page it pukes all over itself. Can anyone help me please? Here's the errors:
    So for the 1st error, I take it I need a variable to hold each value it's going to return? Is there any easier way to do this? Even if I do change the declarations and add more value holders and change the select statement to stuff the values "into" the variables I declare, how do I return them to the DISPLAY & RETURN values that a LOV expects? IE: get them out of the anonymous block?
    ORA-06550: line 1, column 182: PLS-00428: an INTO clause is expected in this SELECT statement ORA-06550: line 1, column 345: PLS-00428: an INTO clause is expected in this SELECT statement.
    Error      ERR-1000 Unable to determine LOV from "declare function x return varchar2 is begin DECLARE VAL BOOLEAN; BEGIN VAL := APEX_UTIL.CURRENT_USER_IN_GROUP(p_group_name=>'Managers'); if VAL = true then select CODE display_value, STATUS_CODE_ID return_value from STATUS_CODES where STATUS_CODE_ID in (3, 4) order by 1; else select CODE display_value, STATUS_CODE_ID return_value from STATUS_CODES where STATUS_CODE_ID in (1, 2, 5, 6, 7, 8) order by 1; end if; END; return null; end; begin wwv_flow_utilities.g_query := x; end;".
    Error: ORA-01403: no data found performing List of Values query: "DECLARE VAL BOOLEAN; BEGIN VAL := APEX_UTIL.CURRENT_USER_IN_GROUP(p_group_name=&gt;'Managers'); if VAL = true then select CODE display_value, STATUS_CODE_ID return_value from STATUS_CODES where STATUS_CODE_ID in (3, 4) order by 1; else select CODE display_value, STATUS_CODE_ID return_value from STATUS_CODES where STATUS_CODE_ID in (1, 2, 5, 6, 7, 8) order by 1; end if; END;".
    Thanks for your help in advance!
    Dave

    But, when I run it in toad(im in our apex db), it throws an error.
    No, it raises an exception, just as it would in SQL*Plus.
    I take it APEX text boxes where you enter code in, are somehow specially parsed?
    In most places in Application Express where it lets you enter anonymous blocks, it puts more code around it to be able to use it in the intended context. Sometimes that means treating the code as a boolean function, sometimes it does other stuff. In this case it has to turn the block into a function that returns a SQL query which can then be parsed.
    Scott

  • How to create global groups for end users

    Just started deployment of Lync 2013.  We do not host our exchange / mail internally.  It is a hosted solution (not exchange).  We do use outlook though.
    It has been a long time since I set up Lync (Since OCS 2007 / 2007 R2)
    Can someone please tell me how to create groups for all users on the Lync Client and populate them from groups in AD.Right now we are using Spark and we have decided to use Lync.  In Spark it queries AD every day and populates the groups from AD
    groups that we have defined.
    I know that users can create there own groups, but we prefer to have every client have every group (department) and those in department listed below rather than them have to manually add them individually.
    Thanks for your direction.
    John

    Hello john,
    Lync Client can't use AD group or Exchange mail group. You can't create Lync client group with AD GPO. each Lync user can create their own group in Lync client and of course can delete.
    You can not manage Lync client within the
    group as the centeral. There is no such
    feature in Lync. you can examine 3rd party applications. for example ;
    http://www.vytru.com/contacts-manager-for-microsoft-lync.html
    Regards
    Zulfikar CAGLAR
    The statement is incorrect. You CAN use Distribution Groups from Active Directory in Lync Client:
    http://support.sherweb.com/Faqs/Show/how-to-add-contacts-from-distribution-lists-in-lync-2013
    Please “Vote As Helpful” and/or “Mark As Answer” if this post helped you.

  • Book POV not showing all deminsions for some users

    I have a book that is suppose to display Scenario, Year, Period & Currency when it is run. However, one user who runs this book only sees Scenario, Year & Period. Her user group is the same as many others within our company who do not have this problem. Does anyone know why this is happening?

    The user only belongs to one group and other users within the group get the full POV selections. Also, we don't have any nested security groups.
    This issue has also presented itself in showing the incorrect POV to some users. I've discovered that this is related to the User's POV in User Preferences though I do not know how to fix it.
    If you go into File>Preferences and select Financial Reporting on the left you should see a button that says "Setup Members". Once inside, Person A sees Scenario, Year, Period, View, Entity, Value, Account, ICP, C1, C2, C3, C4, this is correct. However, Person B sees Scenario, Year, Period, View, Entity, Value, Account, ICP, C4, C1, C2, C3. When this occurs, and these two run the same book, Person A would see the Proper selections for POV. However, person B would see the incorrect custom dimensions. For example, If C1 should be displayed Person B would see C4, If C2 should be displayed Person B would see C1, etc...
    Correct Incorrect
    C1 = C4
    C2 = C1
    C3 = C2
    C4 = C3

Maybe you are looking for

  • Keynote defaulting to PowerPoint

    When I try to open a Keynote file, the files always open in PowerPoint even though the default is set to Keynote. How can I make it open each file in the correct program? I've tried to reset the default using the info panel, but it didn't work and th

  • Web configuration lost when upgrading to advanced server admin

    Hello, after setting correctly the basic configuration,and setting the web servives, we did the upgrade to advanced option and then we focues to other apple problems like getting network connection, starting xgrid,etc), and then is when we realized t

  • Mesh tool - Fish

    Hi! I going through a tutorial where I am going to make a... fish! Step 3 on: http://www.tutorialized.com/view/tutorial/How-to-Create-a-Vector-Goldfish-in-Six-Steps/551 93 I have just made a Clipping Mask of a rectangel and the fishbody, I don't know

  • 'IOError' and 'No file is associated...'

    I'm using the popular PageExporterUtility5.0.1.jsx from Adobe Exchange, among others. I thought it might be useful to gather a bunch of production scripts together into a nice Configurator panel. However, launching this particular script refuses to w

  • ArsTechnica on Daniel_K Driv

    http://arstechnica.com/news.ars/post/2008033-creative-irate-after-modder-spruces-up-vista-x-fi-drivers.html But the real issue isn't the money. Read between the lines, and O'Shaughnessy is proclaiming that his company has the sacred right to enable a