Forum Discussion
"My Groups" list for SharePoint Homepage Web Part
I'm hardly a powershell expert, but more than armed and dangerous, so I'm sure there are many more efficiencies to be had.
Got my first end-user visual set up for including on our home page. I'm using the Group title, with selectable icons underneath to each workload. Have a quick filter text box to narrow down groups and a small pagination to save real estate. Then a link at the bottom to go to our "Informational" page about Groups.
- bart_vermeerschFeb 23, 2017Iron Contributor
We've hit a road block woth this, I'm not sure why.
The groups are visible in the generated list for a member of that group, but the search remains empty for that user unless we manually/explicitely give the member rights (which he already has through the group).
When checking the privileges of a user on an item, it is given by the O365 group, but the item is only visible in the search until the privileges are given directly.
It looks like the search is unable to resolve the group members when crawling. It is strange that this is working in your tenant.
- Brent EllisFeb 23, 2017Silver Contributor
Hmm, I opted to use api and script editor web part to create our web part
Perhaps cfiessinger can flag someone down that knows how search indexing + Groups is working. We havent started using Groups for permissions elsewhere yet, but are definitely planning to and if this is the case, that is a big issue.
<SCRIPT LANGUAGE='JavaScript' type='text/javascript'> $(document).ready(function () { $.ajax({ url : "https://mytenant.sharepoint.com/sites/groups/_api/web/lists/getByTitle('my')/Items?$OrderBy=Title", contentType : "application/json;odata=verbose", headers : { "accept" : "application/json;odata=verbose" }, success : function onSuccess(data, request){ if(data.d.results.length == 0){ $("#listOfGroups").html("No Groups"); } else { for(i=0;i<data.d.results.length;i++){ //console.log(data.d.results[i]); html = "<B>"+data.d.results[i].Title+"</B><BR>" if(data.d.results[i].Conversation){ html += "<a style='font-size:16px;' title='Group Conversations' href='"+data.d.results[i].Conversation.Url+"' target='_blank'><i class='fa fa-comments-o' aria-hidden='true'></i></a> | "; } if(data.d.results[i].Calendar){ html += "<a style='font-size:16px;' title='Group Calendar' href='"+data.d.results[i].Calendar.Url+"' target='_blank'><i class='fa fa-calendar' aria-hidden='true'></i></a> | "; } if(data.d.results[i].Files){ html += "<a style='font-size:16px;' title='Group Files' href='"+data.d.results[i].Files.Url+"' target='_blank'><i class='fa fa-folder-open-o' aria-hidden='true'></i></a> | "; } if(data.d.results[i].Notebook){ html += "<a style='font-size:16px;' title='Group Notebook' href='"+data.d.results[i].Notebook.Url+"' target='_blank'><i class='fa fa-book' aria-hidden='true'></i></a> | "; } if(data.d.results[i].Site){ html += "<a style='font-size:16px;' title='Group SharePoint Site' href='"+data.d.results[i].Site.Url+"' target='_blank'><i class='fa fa-sitemap' aria-hidden='true'></i></a>"; } } $("#listOfGroups").html(str); } }, error: function (jqXHR, textStatus, errorThrown) { console.log(jqXHR); } }); }); </SCRIPT> <div id="listOfGroups"></div>
Note, we've got font-awesome embedded for the icons.
- hgromekDec 03, 2018Copper Contributor
Hi Brent Ellis,
I am trying to recreate the end-user visual web part based on the script you provided. However, I am not getting anything populated (the API is set, I just can't get the records to display? The Str is not defined? Any insight on this? Any help is appreciated.
- darrellaasFeb 21, 2017MVP
That's impressive Brett. The in-built Group discovery experience has some weaknesses. Your web part will be very useful for an organizations that has has high adoption and utilization of their SPO Intranet. I encourage people to favourite the Groups they frequently work in. Then wherever Groups are listed, (OWA, OneDrive, SharePoint Home site, mobile apps) their frequent and favourite Groups are easy to find. But by using your web part, you have more control of the detail that's presented. It would be interested to see what you can bring through from the Microsoft Graph. You could list recent activity, recent conversations, next task due from Planner. A view like this to show your Group 'at-a-glance' would be very useful.