<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Group lookup for users configured in AD fails in VIJAVA in vSphere SDK for Java Discussions</title>
    <link>https://communities.vmware.com/t5/vSphere-SDK-for-Java-Discussions/Group-lookup-for-users-configured-in-AD-fails-in-VIJAVA/m-p/2836725#M708</link>
    <description>&lt;P&gt;I modified a sample program in VIJAVA SDK to retreive user group for a VCenter server configured with&amp;nbsp; Active directory.&lt;/P&gt;&lt;PRE&gt;   UserSearchResult[] usrs = ud.retrieveUserGroups(
          args[3], &lt;SPAN class="code-comment"&gt;// only local machine is searched&lt;/SPAN&gt;          "", &lt;SPAN class="code-comment"&gt;// blank means matching all&lt;/SPAN&gt;          &lt;SPAN class="code-keyword"&gt;null&lt;/SPAN&gt;, args[4], &lt;SPAN class="code-comment"&gt;// all the groups&lt;/SPAN&gt;          &lt;SPAN class="code-keyword"&gt;false&lt;/SPAN&gt;, &lt;SPAN class="code-comment"&gt;//not exact match &lt;SPAN class="code-keyword"&gt;for&lt;/SPAN&gt; the search&lt;/SPAN&gt;          &lt;SPAN class="code-keyword"&gt;false&lt;/SPAN&gt;, &lt;SPAN class="code-comment"&gt;// include users&lt;/SPAN&gt;          &lt;SPAN class="code-keyword"&gt;true&lt;/SPAN&gt; &lt;SPAN class="code-comment"&gt;// include groups&lt;/SPAN&gt;          );

    &lt;SPAN class="code-comment"&gt;// print out the results&lt;/SPAN&gt;    &lt;SPAN class="code-keyword"&gt;for&lt;/SPAN&gt;(&lt;SPAN class="code-object"&gt;int&lt;/SPAN&gt; i=0; usrs!=&lt;SPAN class="code-keyword"&gt;null&lt;/SPAN&gt; &amp;amp;&amp;amp; i &amp;lt; usrs.length; i++)
    {
      &lt;SPAN class="code-object"&gt;System&lt;/SPAN&gt;.out.println(&lt;SPAN class="code-quote"&gt;"==============================="&lt;/SPAN&gt;);
      &lt;SPAN class="code-object"&gt;System&lt;/SPAN&gt;.out.println(&lt;SPAN class="code-quote"&gt;"Full name: "&lt;/SPAN&gt; + usrs[i].getFullName());
      &lt;SPAN class="code-object"&gt;System&lt;/SPAN&gt;.out.println(&lt;SPAN class="code-quote"&gt;"IsGroup:"&lt;/SPAN&gt; + usrs[i].isGroup());
      &lt;SPAN class="code-object"&gt;System&lt;/SPAN&gt;.out.println(&lt;SPAN class="code-quote"&gt;"Principal: "&lt;/SPAN&gt; + usrs[i].getPrincipal());
    }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The program successfully retrieves the group name for a local user created in VCenter.&lt;/P&gt;&lt;P&gt;When I r&lt;STRONG&gt;un the same program for user configured in Active Directory, I am unable to lookup the AD group&lt;/STRONG&gt; it belong . I am not suspecting a VI JAVA issue because it works perfectly fine with VCenter local user/group.&lt;/P&gt;&lt;P&gt;Logging using the AD user/password work fine. only lookup fails.&lt;/P&gt;&lt;P&gt;Is there any additional privleges/configuration&amp;nbsp; I need to add for VCenter Administrator for looking up AD group&amp;nbsp; in VCenter ?&amp;nbsp; OR any pointers on what log files i need to check ?&lt;/P&gt;</description>
    <pubDate>Thu, 18 Mar 2021 19:03:52 GMT</pubDate>
    <dc:creator>murthy123</dc:creator>
    <dc:date>2021-03-18T19:03:52Z</dc:date>
    <item>
      <title>Group lookup for users configured in AD fails in VIJAVA</title>
      <link>https://communities.vmware.com/t5/vSphere-SDK-for-Java-Discussions/Group-lookup-for-users-configured-in-AD-fails-in-VIJAVA/m-p/2836725#M708</link>
      <description>&lt;P&gt;I modified a sample program in VIJAVA SDK to retreive user group for a VCenter server configured with&amp;nbsp; Active directory.&lt;/P&gt;&lt;PRE&gt;   UserSearchResult[] usrs = ud.retrieveUserGroups(
          args[3], &lt;SPAN class="code-comment"&gt;// only local machine is searched&lt;/SPAN&gt;          "", &lt;SPAN class="code-comment"&gt;// blank means matching all&lt;/SPAN&gt;          &lt;SPAN class="code-keyword"&gt;null&lt;/SPAN&gt;, args[4], &lt;SPAN class="code-comment"&gt;// all the groups&lt;/SPAN&gt;          &lt;SPAN class="code-keyword"&gt;false&lt;/SPAN&gt;, &lt;SPAN class="code-comment"&gt;//not exact match &lt;SPAN class="code-keyword"&gt;for&lt;/SPAN&gt; the search&lt;/SPAN&gt;          &lt;SPAN class="code-keyword"&gt;false&lt;/SPAN&gt;, &lt;SPAN class="code-comment"&gt;// include users&lt;/SPAN&gt;          &lt;SPAN class="code-keyword"&gt;true&lt;/SPAN&gt; &lt;SPAN class="code-comment"&gt;// include groups&lt;/SPAN&gt;          );

    &lt;SPAN class="code-comment"&gt;// print out the results&lt;/SPAN&gt;    &lt;SPAN class="code-keyword"&gt;for&lt;/SPAN&gt;(&lt;SPAN class="code-object"&gt;int&lt;/SPAN&gt; i=0; usrs!=&lt;SPAN class="code-keyword"&gt;null&lt;/SPAN&gt; &amp;amp;&amp;amp; i &amp;lt; usrs.length; i++)
    {
      &lt;SPAN class="code-object"&gt;System&lt;/SPAN&gt;.out.println(&lt;SPAN class="code-quote"&gt;"==============================="&lt;/SPAN&gt;);
      &lt;SPAN class="code-object"&gt;System&lt;/SPAN&gt;.out.println(&lt;SPAN class="code-quote"&gt;"Full name: "&lt;/SPAN&gt; + usrs[i].getFullName());
      &lt;SPAN class="code-object"&gt;System&lt;/SPAN&gt;.out.println(&lt;SPAN class="code-quote"&gt;"IsGroup:"&lt;/SPAN&gt; + usrs[i].isGroup());
      &lt;SPAN class="code-object"&gt;System&lt;/SPAN&gt;.out.println(&lt;SPAN class="code-quote"&gt;"Principal: "&lt;/SPAN&gt; + usrs[i].getPrincipal());
    }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The program successfully retrieves the group name for a local user created in VCenter.&lt;/P&gt;&lt;P&gt;When I r&lt;STRONG&gt;un the same program for user configured in Active Directory, I am unable to lookup the AD group&lt;/STRONG&gt; it belong . I am not suspecting a VI JAVA issue because it works perfectly fine with VCenter local user/group.&lt;/P&gt;&lt;P&gt;Logging using the AD user/password work fine. only lookup fails.&lt;/P&gt;&lt;P&gt;Is there any additional privleges/configuration&amp;nbsp; I need to add for VCenter Administrator for looking up AD group&amp;nbsp; in VCenter ?&amp;nbsp; OR any pointers on what log files i need to check ?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 19:03:52 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-SDK-for-Java-Discussions/Group-lookup-for-users-configured-in-AD-fails-in-VIJAVA/m-p/2836725#M708</guid>
      <dc:creator>murthy123</dc:creator>
      <dc:date>2021-03-18T19:03:52Z</dc:date>
    </item>
  </channel>
</rss>

