Get all members of a group - transitive - azure

Is there a call to graph API that returns to me all members of a group - including the users of nested groups?
To get all direct members for a group, there is GetGroupMembers
To get all groups for a user transitively, I have found getMemberGroups
But I didn't find anything to get a list of all members, including subgroups (as in "if I send an email to group xyz, which users will receive it?").
Is there no such function available or did I overlook something?

Related

how GitLab get group Member without invite from groups

If a user is a member of this group or project and also of one or more ancestor groups, only its membership with the highest access_level is returned. (Improved in GitLab 13.11.) This represents the effective permission of the user.
GET /groups/:id/members/all
The group members obtained from the above interface contain the maximum permissions of the members of the invited group. If a group contains an invited group, the exact permissions of the direct members and members inheriting from the parent group cannot be known from the api
how can i do it?
just get including inherited members, invited user

How to get OneLogin group members via API?

There are two interfaces in Groups in the api reference document
url: https://developers.onelogin.com/api-docs/1/groups/get-groups
Get Groups: https:///api/1/groups
Get Group by ID: https:///api/1/groups/:id
I need the interface to get the members of group, is there an interface like Get Group Members not listed? or I should achieve it in other way?

How do I use the graph API to get a listing of all Azure AD groups of which a user is a member?

I can't seem to find the API call to make to check to see if a user that has authenticated themselves is a member of a specific Azure AD group. Retrieving a list of all Azure AD groups the user is a member of would be fine as well. I assume this would be done through the Graph API but I can't seem to find the API I would use for this. How do I get a list of all Azure AD groups the currently authenticated user is a member of?
The previous answer and comments mention using memberOf. However, in most cases you want to use transitiveMemberOf instead: https://learn.microsoft.com/en-us/graph/api/user-list-transitivememberof?view=graph-rest-1.0&tabs=http
memberOf only returns groups that the user is directly a member of whereas transitiveMemberOf respects group nesting.
For example, if User is a member of GroupA and GroupA is a member of GroupB then memberOf will only return GroupA but transitiveMemberOf will return both GroupA and GroupB.
The (v1) Graph API that you're looking for is listed under Users > Groups > List memberOf (https://learn.microsoft.com/en-us/graph/api/user-list-memberof?view=graph-rest-1.0&tabs=http), as confirmed by Allen on the comment. This API will also list the Azure AD role groups for the user.
Note: Just for a general rule, even if the document looks complicated, operation on any resource is listed on the root of Graph API documentation. If you're accessing a property of a user, look at Users. That will help navigating yourself through the documentation.
Another edit: this might be handy for exploring the Graph API https://developer.microsoft.com/en-us/graph/graph-explorer

How to get members of multiple Azure AD groups recursively in a fast way via Azure AD API?

I get groups via
https://graph.windows.net/myorganization/groups?api-version=1.6
Then get all members in some groups that I'm interested in via
https://graph.windows.net/myorganization/groups/{group_obj_id}/members?api-version=1.6
If there are some groups in some group, I recursively get members in that group.
But if I want to extract members of 5 groups and suppose there is 1 group in each group, then 10 different groups in total. One API call sometimes cost about 1s. Then I need to call 10 times, then I need to wait 10 sec!
Does anyone have a faster way to get members in multiple groups (with/without group -in-group)?
At present, the Azure AD Graph REST doesn't support to retrieve the members of a group recursively. We have to get group members level by level.
If you want Azure AD Graph to support this feature, you may submit the feedback from here.

GetStream and activity feeds

I have an existing notification feed, but I'm looking at possibly migrating over to GetStream.
Currently, I'm using Laravel Notifications, to notify users and other objects.
I currently have something like the following:
1) Users
2) Groups
3) Group Members
So, when I CRUD a group, I simply notify all members of the group and also the group ($group->notifications returns a collection), which works fine.
Looking through the GetStream docs though, it seems there is a concept of 'followers'.
Does this mean, that all members of a group need to be followers of each other to see all notifications?
What about other objects, like, retrieving a feed for a Group? Do i need another Group Type in the dashboard to save activities to?
So, If I Person A and Person B are members of Group 1, When Person A saves Group 1, I'd like Person A, to see something like:
You saved Group 1
and Person B will see:
Person A saved Group 1
When I view the Group page, I'd like to pull in the activities that have happened to that Group.
Is this possible?
Thanks
Does this mean, that all members of a group need to be followers of each other to see all notifications?
Probably not. Stream allows you setup feed groups, following relationships, and use "targeting" to send activities to different feeds.
Based on the use case you described, you're probably best off with two Feed Groups, e.g. group and user_timeline. You can give each user their own user timeline feed and set it to follow other group feeds as appropriate.
When a user does something involving the group, an activity can be added to the group feed. This activity then propagates out to all users who follow the group.
What about other objects, like, retrieving a feed for a Group? Do i need another Group Type in the dashboard to save activities to?
You can always create multiple feed groups for a given app. The example with two groups is probably sufficient for your use case but you could go further with 3 groups...
user: User events posted to this feed. This feed will handle specific and non-group specific activities. If the activity relates to a group, the "to" field can be populated with the group feed name and this will cause the activities to be copied to that feed (and in turn propagated to it's followers).
user_timeline: Retrieved by users. Follows group feeds. User's may also follow another user's user_timeline feed in order to receive all events by that user (e.g. an asymmetrical follow like Twitter / or symmetrical follow like Facebook)
group: Receives user generated activities via the 'to' targetting. System/admin generated activities may also be add directly to the feed.

Resources