The javascript Microsoft Graph Toolkit people picker control has an event called "SelectionChanged" that is raised when a user or group is selected in the people picker. It also has a property called "selectedPeople" that list the users and groups that have been selected. Both the event and the property return an array of IDynamicPerson objects.
The problem that I have is that I cannot find a way to distinguih between users and groups. The IDynamicPerson interface does not offer a property to distinguish them. Does anyone knows how to distinguish the users from the groups on the returned IDynamicPerson array?