Table of contents
TOC
Collapse the table of content
Expand the table of content

Retrieve All Groups

Ajinkya Kher|Last Updated: 11/17/2016
|
1 Contributor

Applies to: Skype for Business 2015

Click to retrieve all groups

The personAndGroupsManager object exposes a group, all, which contains all persons and all groups. Using this object we can get access to the groups collection and make a one-time call to get to retrieve information for all groups. It would also be possible to retrieve all groups by calling subscribe on the groups collection and listening to the added event.

// Notify search in progress
var groups = application.personsAndGroupsManager.all.groups;
groups.get().then(function (groups) {
    // updateUI(groups)
    // Groups search complete
}, function (error) {
    // handleError(error)
    // Groups search error
});

Additional resources

© 2017 Microsoft