<?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 Re: mapping users to groups in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/mapping-users-to-groups/m-p/147499#M39036</link>
    <description>&lt;P&gt;From what i could recall, there are no apis OOTB as of ACS5.2.x, not sure about upcoming versions though. However,&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Try these apis in combination&lt;/U&gt; :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://127.0.0.1:8080/alfresco/s/api/people" target="_blank" rel="noopener nofollow noreferrer"&gt;http://127.0.0.1:8080/alfresco/s/api/people&lt;/A&gt; --&amp;gt; Gives the list of users&lt;/P&gt;
&lt;P&gt;Iterate the list of users and call the below api for each user --&amp;gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://127.0.0.1:8080/alfresco/service/api/people/{userId}?groups=true" target="_blank" rel="noopener nofollow noreferrer"&gt;http://127.0.0.1:8080/alfresco/service/api/people/{userId}?groups=true&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Example&lt;/U&gt;:&lt;/P&gt;
&lt;PRE&gt;http://127.0.0.1:8080/alfresco/service/api/people/admin?groups=true&lt;/PRE&gt;
&lt;P&gt;This should give you user's associated groups.&lt;/P&gt;

&lt;P&gt;Alternatively you can also &lt;A href="https://github.com/abhinavmishra14/alfresco-scripts#generate-user-report-along-with-user-groups" target="_self" rel="nofollow noopener noreferrer"&gt;try this script&lt;/A&gt;:&amp;nbsp;&lt;A href="https://github.com/abhinavmishra14/alfresco-scripts/blob/master/src/main/java/com/github/abhinavmishra14/reports/test/GenerateUserReport.java" target="_blank" rel="noopener nofollow noreferrer"&gt;https://github.com/abhinavmishra14/alfresco-scripts/blob/master/src/main/java/com/github/abhinavmishra14/reports/test/GenerateUserReport.java&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;It will give you a user report with their groups and associated sites as well. A sample report can be seen here:&amp;nbsp;&lt;A href="https://github.com/abhinavmishra14/alfresco-scripts/blob/master/samples/userReports.json" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/abhinavmishra14/alfresco-scripts/blob/master/samples/userReports.json&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 12 Jul 2021 14:24:55 GMT</pubDate>
    <dc:creator>abhinavmishra14</dc:creator>
    <dc:date>2021-07-12T14:24:55Z</dc:date>
    <item>
      <title>mapping users to groups</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/mapping-users-to-groups/m-p/147498#M39035</link>
      <description>&lt;P&gt;I am in the process of migrating an ACS 4.2.6 instance to a new data center and have the tedious task of creating locally authenticated users in place of the LDAP-authenticated users on the source system. Part of this process will entail adding users to the appropriate groups. Is there a way to print out a list of users &lt;EM&gt;and&lt;/EM&gt; the groups to which they belong? I found these 2 API calls to generate a list of users and groups:&lt;/P&gt;&lt;PRE&gt;curl -u admin:****** "http://localhost:8080/alfresco/s/api/people" &amp;gt; users_20210708.json
curl -u admin:****** "http://localhost:8080/alfresco/s/api/groups" &amp;gt; groups_20210708.json&lt;/PRE&gt;&lt;P&gt;...but the list of users didn't include their group membership, nor did the list of groups include which users were a part of them. I know I can get this information from the admin console, but I was hoping for an easier way,&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 13:29:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/mapping-users-to-groups/m-p/147498#M39035</guid>
      <dc:creator>pauldavidmena</dc:creator>
      <dc:date>2021-07-12T13:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: mapping users to groups</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/mapping-users-to-groups/m-p/147499#M39036</link>
      <description>&lt;P&gt;From what i could recall, there are no apis OOTB as of ACS5.2.x, not sure about upcoming versions though. However,&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Try these apis in combination&lt;/U&gt; :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://127.0.0.1:8080/alfresco/s/api/people" target="_blank" rel="noopener nofollow noreferrer"&gt;http://127.0.0.1:8080/alfresco/s/api/people&lt;/A&gt; --&amp;gt; Gives the list of users&lt;/P&gt;
&lt;P&gt;Iterate the list of users and call the below api for each user --&amp;gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://127.0.0.1:8080/alfresco/service/api/people/{userId}?groups=true" target="_blank" rel="noopener nofollow noreferrer"&gt;http://127.0.0.1:8080/alfresco/service/api/people/{userId}?groups=true&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Example&lt;/U&gt;:&lt;/P&gt;
&lt;PRE&gt;http://127.0.0.1:8080/alfresco/service/api/people/admin?groups=true&lt;/PRE&gt;
&lt;P&gt;This should give you user's associated groups.&lt;/P&gt;

&lt;P&gt;Alternatively you can also &lt;A href="https://github.com/abhinavmishra14/alfresco-scripts#generate-user-report-along-with-user-groups" target="_self" rel="nofollow noopener noreferrer"&gt;try this script&lt;/A&gt;:&amp;nbsp;&lt;A href="https://github.com/abhinavmishra14/alfresco-scripts/blob/master/src/main/java/com/github/abhinavmishra14/reports/test/GenerateUserReport.java" target="_blank" rel="noopener nofollow noreferrer"&gt;https://github.com/abhinavmishra14/alfresco-scripts/blob/master/src/main/java/com/github/abhinavmishra14/reports/test/GenerateUserReport.java&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;It will give you a user report with their groups and associated sites as well. A sample report can be seen here:&amp;nbsp;&lt;A href="https://github.com/abhinavmishra14/alfresco-scripts/blob/master/samples/userReports.json" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/abhinavmishra14/alfresco-scripts/blob/master/samples/userReports.json&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 14:24:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/mapping-users-to-groups/m-p/147499#M39036</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2021-07-12T14:24:55Z</dc:date>
    </item>
  </channel>
</rss>

