<?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 Adding Users to Group(Creating Via Webscript) via API or Java based Webscript in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/adding-users-to-group-creating-via-webscript-via-api-or-java/m-p/82832#M25400</link>
    <description>&lt;P&gt;I want to add bulk users to different different groups (creating group via Webscripts) uusing API service or Java based Web Script.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pravin Gupta&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jun 2020 09:42:45 GMT</pubDate>
    <dc:creator>PravinGupta</dc:creator>
    <dc:date>2020-06-03T09:42:45Z</dc:date>
    <item>
      <title>Adding Users to Group(Creating Via Webscript) via API or Java based Webscript</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/adding-users-to-group-creating-via-webscript-via-api-or-java/m-p/82832#M25400</link>
      <description>&lt;P&gt;I want to add bulk users to different different groups (creating group via Webscripts) uusing API service or Java based Web Script.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pravin Gupta&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 09:42:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/adding-users-to-group-creating-via-webscript-via-api-or-java/m-p/82832#M25400</guid>
      <dc:creator>PravinGupta</dc:creator>
      <dc:date>2020-06-03T09:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Users to Group(Creating Via Webscript) via API or Java based Webscript</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/adding-users-to-group-creating-via-webscript-via-api-or-java/m-p/82833#M25401</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/81933"&gt;@PravinGupta&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;Take a look at this &lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-forum/i-want-to-add-bulk-users-to-groups-and-provide-roles-and/td-p/296530" target="_self" rel="nofollow noopener noreferrer"&gt;solution&lt;/A&gt; -&amp;nbsp; it might provide the basis for your own solution.&lt;/P&gt;
&lt;P&gt;HTH&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 12:11:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/adding-users-to-group-creating-via-webscript-via-api-or-java/m-p/82833#M25401</guid>
      <dc:creator>EddieMay</dc:creator>
      <dc:date>2020-06-03T12:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Users to Group(Creating Via Webscript) via API or Java based Webscript</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/adding-users-to-group-creating-via-webscript-via-api-or-java/m-p/82834#M25402</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/76783"&gt;@EddieMay&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I think solution provided by you is similar to my requirement but what i want is to Create group if Group is not Present and to add user to that Group(Group present by default or Group newly Created). I think createGroup service is to be used here but how to combine my both statement to Create group if not present and to add user to it&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pravin&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 13:43:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/adding-users-to-group-creating-via-webscript-via-api-or-java/m-p/82834#M25402</guid>
      <dc:creator>PravinGupta</dc:creator>
      <dc:date>2020-06-03T13:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Users to Group(Creating Via Webscript) via API or Java based Webscript</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/adding-users-to-group-creating-via-webscript-via-api-or-java/m-p/82835#M25403</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/81933"&gt;@PravinGupta&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;When you write,&amp;nbsp; "&lt;SPAN&gt;i want is to Create group if Group is not Present" - you will have to do a group lookup as mentioned in that post I referred to -&lt;A href="https://api-explorer.alfresco.com/api-explorer/#!/groups/listGroups" target="_blank" rel="nofollow noopener noreferrer"&gt;https://api-explorer.alfresco.com/api-explorer/#!/groups/listGroups&lt;/A&gt;. If the group doesn't exist, then you will have to create the group&amp;nbsp;&lt;A href="https://api-explorer.alfresco.com/api-explorer/#!/groups/createGroup" target="_blank" rel="nofollow noopener noreferrer"&gt;https://api-explorer.alfresco.com/api-explorer/#!/groups/createGroup&lt;/A&gt;. To add a person to your existing or new group -&amp;nbsp;&lt;A href="https://api-explorer.alfresco.com/api-explorer/#!/groups/createGroupMembership" target="_blank" rel="nofollow noopener noreferrer"&gt;https://api-explorer.alfresco.com/api-explorer/#!/groups/createGroupMembership&lt;/A&gt;&amp;nbsp;- here's the &lt;A href="https://docs.alfresco.com/community/concepts/dev-api-by-language-alf-rest-manage-people-groups-add-person-group-to-group.html" target="_self" rel="nofollow noopener noreferrer"&gt;documentation&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also look at this api -&amp;nbsp;&lt;A href="https://api-explorer.alfresco.com/api-explorer/#!/groups/listGroupMembershipsForPerson" target="_blank" rel="nofollow noopener noreferrer"&gt;https://api-explorer.alfresco.com/api-explorer/#!/groups/listGroupMembershipsForPerson&lt;/A&gt;&amp;nbsp;&amp;amp; this &lt;A href="https://docs.alfresco.com/community/concepts/dev-api-by-language-alf-rest-manage-people-groups-list-person-group-membership.html" target="_self" rel="nofollow noopener noreferrer"&gt;documentation&lt;/A&gt;&amp;nbsp;to see if the user belongs to a group or groups.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In psuedo code:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;if (!group exist) {

create group

add user to group

} else if (!user member of group) {
add user to group
}&lt;/PRE&gt;
&lt;P&gt;I think that might work. Caveat: Not tested!&lt;/P&gt;
&lt;P&gt;HTH,&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 16:27:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/adding-users-to-group-creating-via-webscript-via-api-or-java/m-p/82835#M25403</guid>
      <dc:creator>EddieMay</dc:creator>
      <dc:date>2020-06-03T16:27:08Z</dc:date>
    </item>
  </channel>
</rss>

