[TIP]-Getting Uses Group Names Efficiently

We were having trouble getting the names of the groups that a user belonged to. We could easily get the object ID's but getting the name for each group was very slow issuing single row queries. Anyway we are able to query group memberships efficiently using a queryfilter.
Here is a code snippet in Java:
public ArrayList getUserGroupNames ()
throws MalformedURLException, RemoteException, NotInRequestException
ArrayList groupNames = new ArrayList();
IRemoteSession remoteSession = edk.getRemotePortalSession();
//Get array of group object Id's that the user belongs too.
int[] groupIdArray = remoteSession.getUserManager().getCurrentUserGroups();
//Issue a query on the object Id's to get their names
ObjectProperty[] op = {UserGroupProperty.SimpleName};
QueryFilter[] qf = {new IntArrayQueryFilter(ObjectProperty.ObjectID, Operator.In, groupIdArray)};
IObjectQuery ioq = remoteSession.getUserGroupManager().queryObjects(-1, 0, -1, ObjectProperty.ObjectID, true, op, qf);
for (int i = 0; i < ioq.getRowCount(); i++)
groupNames.add(ioq.getRow(i).getStringValue(UserGroupProperty.SimpleName));
return groupNames;
Hope this is usefull to others.

Hi,
You can still add 50 addresses to the group in the paid version and test it without sending it. After adding all contacts to the group, click on the group name and it should launch the Mail application with all recipient's email addresses populated in the respective To, CC or BCC fields. You can touch the CC or BCC fields and it will expand the list containing all the addresses.
Since you dont wan't to send the email, you can just cancel out of the operation after verifying if all the email addresses are being populated.

Similar Messages

  • LabVIEW 8.0:: How to get the group name of a user logged to a NI Security Domain?

    Hello all,
    I am using LabVIEW 8.0 PDS.
    I created a new local domain called "MyDomain" in the "NI Domain Account Manager" . I added a new User called "MyUser" and a new group called "Maintenance". I set "MyUser" to be a member of the "Maintenance" group. Then, I configured LabVIEW to invoke the login dialog at start-up in order to log "MyUser" with the correct password.
    I would like to get the group name of the current user logged programmatically in a VI. I tried with the VI Server >> Application >> Security properties and methods and also with the properties and methods of the NI Security Class but it seems to be not so simple as I believed at start.
    I do not find any informations or KB on this (all the documents I found deal with LV DSC or TestStand).
     The final goal is to be able to manage a list of user for my application. Each user is a member of a group ("Administrator", "Operator", "Maintenance") and depending on the group, the user can or cannot access to some parts of the application.
    Thanks for your help.
    Matthieu
    Eurilogic

    Re,
    Here is a screenshot of this functions...
    If you really own LV DSC 8.2 the best thing to do is to reinstall it.
    Regards, 
    Message Edité par Richard K. le 04-02-2007 04:00 AM
    Richard Keromen
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    >> Découvrez, en vidéo, les innovations technologiques réalisées en éco-conception
    Attachments:
    security.jpg ‏3841 KB

  • How to get tag group name?

    Hi experts,
    I am new in PCO Queries.
    I have requirement of fetching Tagname , Description and TagGroup name from OPC and  insert into Sybase db table.
    how can I write the PCO Query to fetch tag's  group name and tag description .
    Tagnames are configured as alias in agent instance instead of subscription items and entered manually with data type as float.
    I am assuming that Description and Group name should configure while adding tags in PCO as alias then write a PCO query and send to Sybase tables.
    Please help me to get group name and Description of tag which belongs to it.
    your earliest help would be highly appreciated.
    Thanks&Regards,
    Pooja.
    Message was edited by: pooja rani

    Hi Steve,
    Thanks for your reply.
    RSView 32 OPC server and PCO2.3 and MII server 14.0  we are using.
    Thanks&Regards,
    Pooja.

  • Get the groups name of a user in openldap authenticator

    Hi,
    I am using an openldap for user authentification. How can i retreive the groups name of a user ? I read that i must use the GroupManagerControl class.
    What is the way to specify the openldap authenticator using the above class ?
    Thanks for help.

    If you are referring to a user's group membership in the Active Directory, then indeed JNDI & LDAP can be used to retrieve these values.
    If you are referring to a user's local groups on their own workstation, then you may want to investigate either the JNDI NTLM provider or perhaps the Samba JCIFS stuff.

  • How to get the group name of a user

    Hi,
    I am using an openldap for user authentification. How can i retreive the groups name of a user ? I read that i must use the GroupManagerControl class.
    What is the way to specify the openldap authenticator using the above class ?
    Thanks for help.

    Re,
    Here is a screenshot of this functions...
    If you really own LV DSC 8.2 the best thing to do is to reinstall it.
    Regards, 
    Message Edité par Richard K. le 04-02-2007 04:00 AM
    Richard Keromen
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    >> Découvrez, en vidéo, les innovations technologiques réalisées en éco-conception
    Attachments:
    security.jpg ‏3841 KB

  • I am having trouble sending bulk emails (less than 100 at a time) on my gmail account using group names created from my address book.  I use Mail on my I-Mac.  When I try to send out a bulk email, the message shows up that my server can't send them, etc.

    I am having trouble sending bulk emails from a Mail Group (less than 100 at a time) on my gmail account.  They come back saying the server can't recognize the data and try again with selected server or try later or edit message, all of which I have attempted a number of times, including re-booting the computer.  I am wondering if there is something wrong in my Address Book?  I have check Apple Preferences, and Mail Preferences and all seems in order.  I can send to any of the individual addresses, but not in a group.
    Thanks for your help.

    Install ClamXav and run a scan with that. It should pick up any trojans.   
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101

  • How to get used InfoPackage name in SAP BW 3.5 in update/ start routine?

    Hello Experts,
    according to the Infopackage (weekly load ord monthly) the update rule should change.
    In BI 7.0 helps the method P_R_REQUEST. Is there any similar for BW 3.5? =Or is there a possiblility to get the request nr in the startroutine with accordant mapping table to InfoPackage?
    Best regards,
    Stephan Wagner

    Hi Experts,
    thank you for your answers. Now, I have got the mapping table InfoPackage/ Request-ID.
    But, how can I get the actual Request ID in the start routine in BW 3.5?
    The tables MONITOR and MONITOR_RECNO don´t store it and they needs to be filled.
    MONITOR_RECNO
    MSGID
    MSGTY
    MSGNO
    MSGV1
    MSGV2
    MSGV3
    MSGV4
    DETLEVEL
    RECNO
    MONITOR
    MSGID
    MSGTY
    MSGNO
    MSGV1
    MSGV2
    MSGV3
    MSGV4
    DETLEVEL
    Best Regards,
    Stephan

  • Getting group names for a list of IDs

    I've got the list of group IDs of which the user is a member, and I'm trying to get the group names in a single query. I've got it working where I get each name in a loop, but I'm concerned about performance if a user is a member of a large number of groups.
    This is the Java code I've been fooling with:
    Object qFilter[][] = new Object[3][1];Integer ids[] = new Integer[iGroupIDs.length];for (i = 0; i < iGroupIDs.length; i++) { ids[i] = (Integer)iGroupIDs; }
    qFilter[0][0] = new Integer(PT_PROPIDS.PT_PROPID_USERGROUP_GROUPID); qFilter[1][0] = new Integer(PT_FILTEROPS.PT_FILTEROP_IN);qFilter[2][0] = ids;ptQueryResult = objMgrGroups.Query(PT_PROPIDS.PT_PROPID_USERGROUP_SIMPLENAME, -1, PT_PROPIDS.PT_PROPID_USERGROUP_SIMPLENAME, 0,-1,qFilter);
    I keep getting an exception:
    Native exception: The parameter is incorrect. (0x80070057): [ParseQueryFilter error on clause #0
    (0x80070057) Invalid property ID specified (0x10000)] (612,PTDispatch.cpp)
    I'm new to PT programming so I'm a bit stumped as to what is the issue. Any hints anyone can offer is appreciated. Thanks!

    Thanks to everyone - responded.
    This is group set up when creating user. This is standard functionality.
    What we do:
    Step 1.
    Using "Administer" tab in portal, then using "Create new groups" link, We have created various groups. We assigned six digit numeric value to group name. We have several groups, such as 001234, 002235, 003348. These group's have different privilege.
    Step 2.
    Using "Administer" tab, we create new user on a regular basis using "Create new users" link. Later on, we assign these new user to a group created in step 1.
    We have a custom table, where we store, user and their corresponding group information, such as:
    record user name group name date created
    1 aaa 001234 01-02-04
    2 bbb 001234 01-04-04
    3 ccc 002235 01-05-04
    Key in the table is based on both user and group name.
    What I need to find out is, when user 'aaa' logged in, to find out who is the user and what portal group this user belong to.
    Then join these two value to our custom table to make sure to match the user and his group name, and get other value from other table and display in the LOV.
    But I am not sure what API need to use in my query in LOV. Or is there any other way?
    Thanks

  • Hot to get group name in obiee 11g

    Hi All,
    We have a requirement that whenever user login in answers, based on his group he should be able to see only his department data.If some how captures the group name we can filter the data by assisgning the group name to the variable but we stuck up with getting the group name.Please help us

    VALUEOF(NQ_SESSION.GROUP) shud give u the value of GROUP
    http://108obiee.blogspot.in/2009/10/referencing-group-session-variable-in.html
    http://gerardnico.com/wiki/dat/obiee/system_session_variable
    Pls mark answered if it solves the issue.

  • How can we retrieve the Group name from oid?

    Hi:
    In following request object, we can get all the user related information from oid except group name where a particular user belongs to.
    For instance user id, first name, last name and email etc but we could not get the group name.
    PortletRenderRequest pReq = (PortletRenderRequest)
    request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    pReq.getUser()……
    Please advice, how I we get the hold of group name from orcldefaultprofilegroup (oid)?
    I would really appreciate your reply.
    Thank you.
    - Ali Raza.

    I am not sure about the PDK API to get the group name. But using LDAP API its easy to get the User Group.
    If you find the answer to get the group name using PDK API, Please update in forum. It will really help others.
    --Balaji S                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Purchase Group name

    Hello Friends,
      is there any where can i get purchase group name by passing purchase group number?
    thanks,
    john.

    Hi,
       See table HRP1000 with  the Purchasing group ID.You will get all the deatils for the Purchasing group including the Purchasing group name in the field "STEXT".
    HTH.
    BR,
    Disha.
    Pls reward points for useful answers.

  • Retrieving user detail, group name for all users

    Hi,
    How can I retrieve User name, email, authentication, user group name
    for all users using SDK.
    It is possible to create this report in webi or CR?
    Thank you for reply,
    Gregor

    Use the following code to retrieve this information:
    IInfoObjects users = oInfoStore.query("select * from ci_systemobjects where si_kind='user'");
    for (int i=0; i<users.size(); i++)
             IUser user = (IUser)users.get(i);
             // user.getTitle(); for user name
             // user.getFullName(); for user's full name
             //  user.getEmailAddress(); for user's email address
             //  for authentication type:
             IUserAliases alises = user.getAliases();
             for(int j=0; j<aliases.size();j++)
                       IUserAlias alias = alises.get(j);
                       // alias.getAuthentication() for authentication associated with this alias, since same user can have more than 1 authentication. e.g. Enterprise and Ldap.
             // for user group memberships:
             java.util.Set groups = user.getGroups();        
             // the groups Set object will contain SI_ID of all the user groups that this uses is member of. You need to query by the SI_ID of the usergroup to get the group names.
    //  e.g.
    //    oInfoStore.query("select si_id, si_name from ci_systemobjects where si_kind='usergroup' and si_id in (a,b,c....)");
    where a,b,c are the SI_IDs of the usergroups.
    To create a report based on the above fetched data, there are several methods such as:
    you can use Java resultset where in you create the report structure in designer and push the data at runtime using java result set objects. Another way is to push this info in Excel or Access and design your report based on that excel\access.

  • Group name in which a particular user is member

    Hi all,
    I would like to be able to get the group name in which a particular user is a member.
    I have created 2 groups: CHEFS and EMPLOYEES.
    The Chefs are members of both groups. The "normal" Employee is the member only of EMPLOYEE group.
    I have the navigation plsql portlet. And I would like to enable any links of this portlet only for chefs. At default these are disabled.
    Now I make it with the function get_user_group:
    =========================================
    create or replace function get_user_group
    v_username IN VARCHAR2,
    v_groupname IN VARCHAR2
    return boolean
    as
    var_groupname varchar2(50);
    begin
    select upper(name)
    into var_groupname
    from portal.wwsec_group
    where id in (select group_id from portal.wwsec_flat
    where person_id in (select id from portal.wwsec_person
    where user_name=upper(v_username)))
    and name=v_groupname;
    return true;
    exception
    when no_data_found then
    return false;
    end;
    =====================================
    But the user needs DBA privileges to select on the tables of PORTAL-User.
    I don't want to give this privileges to user.
    Is there any other way to get the usergroup?
    Regards
    Leonid Pavlov

    There are portal API's that look like they would do exactly what you are asking for. Take a look at the wwsec_api functions, specifically, is_user_in_direct_group or is_user_in_group in http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/PLSQL/DOC/PLDOC_9026/D:/PDK/pdkjuly/pdk/plsql/doc/pldoc_9026/index.html.
    These API's are specific to 9.0.2.6. You'll have to ask someone who knows other versions if you are running something else.

  • Not able to get group name by using memberof class, getting Total groups as 0 even I am member of that group.

    Not able to get group name by using memberof class, getting Total groups as 0 even I am member of that group. Through this memberof class I am trying to find full qualified name(DN) of my group.
    code I have used:
    //specify the LDAP search filter
                   String searchFilter = "(&(objectClass=user)(CN=Username))";
                   //Specify the Base for the search
                   String searchBase = "";
    Also I have used,
                 String searchFilter = "(&(objectClass=user)(CN=Username))";
                   //Specify the Base for the search
                   String searchBase = "ou=ibmgroups,o=ibm.com";
    But in both cases I am getting value for Total groups as 0.
    Code Reference:
    * memberof.java
    * December 2004
    * Sample JNDI application to determine what groups a user belongs to
    import java.util.Hashtable;
    import javax.naming.*;
    import javax.naming.ldap.*;
    import javax.naming.directory.*;
    public class memberof     {
         public static void main (String[] args)     {
              Hashtable env = new Hashtable();
              String adminName = "CN=Administrator,CN=Users,DC=ANTIPODES,DC=COM";
              String adminPassword = "XXXXXXX";
              String ldapURL = "ldap://mydc.antipodes.com:389";
              env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
              //set security credentials, note using simple cleartext authentication
              env.put(Context.SECURITY_AUTHENTICATION,"simple");
              env.put(Context.SECURITY_PRINCIPAL,adminName);
              env.put(Context.SECURITY_CREDENTIALS,adminPassword);
              //connect to my domain controller
              env.put(Context.PROVIDER_URL,ldapURL);
              try {
                   //Create the initial directory context
                   LdapContext ctx = new InitialLdapContext(env,null);
                   //Create the search controls          
                   SearchControls searchCtls = new SearchControls();
                   //Specify the search scope
                   searchCtls.setSearchScope(SearchControls.SUBTREE_SCOPE);
                   //specify the LDAP search filter
                   String searchFilter = "(&(objectClass=user)(CN=Andrew Anderson))";
                   //Specify the Base for the search
                   String searchBase = "DC=antipodes,DC=com";
                   //initialize counter to total the group members
                   int totalResults = 0;
                   //Specify the attributes to return
                   String returnedAtts[]={"memberOf"};
                   searchCtls.setReturningAttributes(returnedAtts);
                   //Search for objects using the filter
                   NamingEnumeration answer = ctx.search(searchBase, searchFilter, searchCtls);
                   //Loop through the search results
                   while (answer.hasMoreElements()) {
                        SearchResult sr = (SearchResult)answer.next();
                        System.out.println(">>>" + sr.getName());
                        //Print out the groups
                        Attributes attrs = sr.getAttributes();
                        if (attrs != null) {
                             try {
                                  for (NamingEnumeration ae = attrs.getAll();ae.hasMore();) {
                                       Attribute attr = (Attribute)ae.next();
                                       System.out.println("Attribute: " + attr.getID());
                                       for (NamingEnumeration e = attr.getAll();e.hasMore();totalResults++) {
                                            System.out.println(" " +  totalResults + ". " +  e.next());
                             catch (NamingException e)     {
                                  System.err.println("Problem listing membership: " + e);
                   System.out.println("Total groups: " + totalResults);
                   ctx.close();
              catch (NamingException e) {
                   System.err.println("Problem searching directory: " + e);
    Any help will be highly appreciated.

    Not able to get group name by using memberof class, getting Total groups as 0 even I am member of that group. Through this memberof class I am trying to find full qualified name(DN) of my group.
    code I have used:
    //specify the LDAP search filter
                   String searchFilter = "(&(objectClass=user)(CN=Username))";
                   //Specify the Base for the search
                   String searchBase = "";
    Also I have used,
                 String searchFilter = "(&(objectClass=user)(CN=Username))";
                   //Specify the Base for the search
                   String searchBase = "ou=ibmgroups,o=ibm.com";
    But in both cases I am getting value for Total groups as 0.
    Code Reference:
    * memberof.java
    * December 2004
    * Sample JNDI application to determine what groups a user belongs to
    import java.util.Hashtable;
    import javax.naming.*;
    import javax.naming.ldap.*;
    import javax.naming.directory.*;
    public class memberof     {
         public static void main (String[] args)     {
              Hashtable env = new Hashtable();
              String adminName = "CN=Administrator,CN=Users,DC=ANTIPODES,DC=COM";
              String adminPassword = "XXXXXXX";
              String ldapURL = "ldap://mydc.antipodes.com:389";
              env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
              //set security credentials, note using simple cleartext authentication
              env.put(Context.SECURITY_AUTHENTICATION,"simple");
              env.put(Context.SECURITY_PRINCIPAL,adminName);
              env.put(Context.SECURITY_CREDENTIALS,adminPassword);
              //connect to my domain controller
              env.put(Context.PROVIDER_URL,ldapURL);
              try {
                   //Create the initial directory context
                   LdapContext ctx = new InitialLdapContext(env,null);
                   //Create the search controls          
                   SearchControls searchCtls = new SearchControls();
                   //Specify the search scope
                   searchCtls.setSearchScope(SearchControls.SUBTREE_SCOPE);
                   //specify the LDAP search filter
                   String searchFilter = "(&(objectClass=user)(CN=Andrew Anderson))";
                   //Specify the Base for the search
                   String searchBase = "DC=antipodes,DC=com";
                   //initialize counter to total the group members
                   int totalResults = 0;
                   //Specify the attributes to return
                   String returnedAtts[]={"memberOf"};
                   searchCtls.setReturningAttributes(returnedAtts);
                   //Search for objects using the filter
                   NamingEnumeration answer = ctx.search(searchBase, searchFilter, searchCtls);
                   //Loop through the search results
                   while (answer.hasMoreElements()) {
                        SearchResult sr = (SearchResult)answer.next();
                        System.out.println(">>>" + sr.getName());
                        //Print out the groups
                        Attributes attrs = sr.getAttributes();
                        if (attrs != null) {
                             try {
                                  for (NamingEnumeration ae = attrs.getAll();ae.hasMore();) {
                                       Attribute attr = (Attribute)ae.next();
                                       System.out.println("Attribute: " + attr.getID());
                                       for (NamingEnumeration e = attr.getAll();e.hasMore();totalResults++) {
                                            System.out.println(" " +  totalResults + ". " +  e.next());
                             catch (NamingException e)     {
                                  System.err.println("Problem listing membership: " + e);
                   System.out.println("Total groups: " + totalResults);
                   ctx.close();
              catch (NamingException e) {
                   System.err.println("Problem searching directory: " + e);
    Any help will be highly appreciated.

  • When I enter a group name into the Bcc field and try to send the message, I get "[group name] is not a valid e-mail address..."

    Been using the same template to send a weekly newsletter for a year or two but now with a recent update to Thunderbird the group name is rejected when I try to send the message:
    With a group name in Bcc field, when I press "Send" and try to send the message, I get this alert: "[group name] is not a valid e-mail address because it is not of the form user@host. You must correct it before sending the e-mail."

    This has been reported as [https://bugzilla.mozilla.org/show_bug.cgi?id=1060901 Bug #1060901]. If you have an account on Bugzilla, please consider voting for that issue.
    Several other people have sent in the same support request as you, noting this happened after they upgraded to version 31.1.
    The exact error message is: XXXX is not a valid e-mail address because it is not of the form user@host. You must correct it before sending the e-mail.
    '''This happens in Thunderbird 31.1.0 when your mailing list description includes several words separated by spaces.'''
    Although not ideal, these workarounds should let you use your mailing lists until a proper fix is implemented:
    * While composing an email open the address book and select the list you are trying to send to, highlight all the names in the list and drag them to the To: box. This uses your existing data without modifying it.
    * Replacing the blanks " " between the words in such lists' descriptions with an underscore "_". This requires modifying your mailing list(s) description(s).
    * Downgrade to a previous version and disable automatic updates (Windows)

Maybe you are looking for

  • A security question pertaining to disabling the root login. [SOLVED]

    I've recently been configuring sudo and came across the following piece of advice: https://wiki.archlinux.org/index.php/Su … root_login After making my normal user a full fledged sudoer I followed the advice in the link above. passwd -l root worked b

  • Device Error - Sense Code

    I have tried to burn a DVD using Premier 2.0. Once I got a message - Device Error - Sense Code (04 91 C0) the second time I got the same message but a different Code - (04 92 05). A Third time I got an "Unknown Error" message. After the first error,

  • BAPI'S IN S&D

    Hello Friends, Can You please share with me Standard BAPI's available for the following transactions in S&D: 1.Sales Order 2.Delivery 3.Billing 4.Sales Returns 5.Inter depot transfer 6.Inter Depot receipt 7.Credit Note 8.Debit Note it is urgent,await

  • Authorization with LCDS

    I have a flex application and LCDS running on CF8 running on JRun4 on the server. The flex application authenticates users with LCDS security that in term uses custom-authentication together with Jrun-security to authenticate against a MySQL DB. I us

  • Can't update my iphone

    I Can't update my iPhone 4.there is a new software iOS 7.1.2 I want to install but it keeps saying there is no internet service while I have full wifi internet available . Please help me out. Thanks