SharePoint-2013
How to Get All Users From Site Group in SharePoint 2013 Using REST API
How to populate a drop down with all the users from a Site Group in SharePoint 2013 on premise Using REST API

In this article you will see how to get all the users from a site group using the REST API in SharePoint 2013 Online.

Introduction

SharePoint 2013 introduces a Representational State Transfer (REST) service that is comparable to the existing SharePoint client object models. Share point allows the developers to interact remotely with SharePoint data using any technology that supports REST web requests. Developers can perform Create, Read, Update, and Delete (CRUD) operations.

From their apps for SharePoint, solutions, and client applications, they are using REST web technologies and standard Open Data Protocol (OData) syntax. In this article, you will see the following.

  • Create an app using NAPA Tool in SharePoint 2013 Online.
  • Cross-Domain Requests.
  • Get all the users from the host site group using the REST API.

Source Code:

<script src=”../SiteAssets/jquery-1.11.3.js”></script>
<script type=”text/javascript”>
$.ajax({
url: _spPageContextInfo.webAbsoluteUrl + “/_api/web/sitegroups/getByName(‘GroupName’)/users”,
type: “GET”,
headers: {“accept”: “application/json;odata=verbose”},
success: function (data){
if (data.d.results)
{
for (var i = 0; i < data.d.results.length; i++) {

//Loop through all users and binding in dropdown
if (data.d.results[i] != null && data.d.results[i] != undefined) {
if ($(“#ddlGroup option[value='” + data.d.results[i] + “‘]”).length == 0) {
$(‘#ddlGroup’).append($(“<option/>”, {
value: data.d.results[i].Email,
text: data.d.results[i].Title
}));
}
}
}
}
},
error: function (error) {
alert(JSON.stringify(error));
}
});
</script>

Summary

Thus in this article you saw how to get all the users from a site group using the REST API in SharePoint 2013 Online.

For any query or solution you can contact us or email us for solution. Check our website for more such content.

Angular 5
Angular 5 new features

The update from AngularJS to Angular 2 was a huge step forward. Still, it was also infamous for not being backward compatible. In contrast, Angular 4 brought us new features while being backward compatible. And now, six months later, the latest major release of Angular 5 is available.

The upgrade to Angular 5 is an incremental one. Because many of the changes re done invisibly.

However, some breaking changes included, so some developers will still have a lot of work to do. The changes will be easy to handle for all the developers who kept their codebases up-to-date.

The focus of Angular 5 was to make Angular faster again. Smaller bundles have improved the loading time. The execution has been developed as well by optimizations at the compiler. For some projects, it is also important to note that the ng-upgrade is still in progress.

AngularJS applications allow being migrated smoothly to Angular and vice versa as Angular components embedded as downgrades in AngularJS applications.

Additionally, experimental technologies and features developed in a unique lab space outside the Angular Framework. They can be evaluated and tested by developers at an early stage without negatively affecting the release planning of the framework itself.

For any query, contact us or email us to [email protected].