Detect and fetch members of nested groups - microsoft-graph-api

In the Groups section of the Office 365 admin center, you can create and manage these types of groups:
Office 365 Groups (aka Unified Groups)
Security Groups
Mail enabled security groups
Distribution lists
Office 365 groups can not have nested groups in them.
But it turns out all the other groups can be nested in each other.
Nested group: If I have a security group called GroupA. GroupA can have members which are either users or other groups. GroupB is what I am calling a 'nested group' if it is a member of GroupA.
I need to have possibility to be able to detect all members of given group.
I can use this Microsoft Graph endpoint to get the list of the group's direct members. As Microsoft documentation states
A group can have users, contacts, and other groups as members. This operation is not transitive.
I can recursively traverse all members of current group and all nested groups, nested groups of these nested groups and so on. But I would like to omit this approach because it would be slow and useless.
Maybe there is an option or query parameter to "expand" groups and get all direct and indirect members of it or something like that?
Thanks in advance.

You can use transitive members api to get all members in a given group.

Related

Microsoft Graph API with Azure AD B2C: Get all users and their group membership

We are trying to retrieve a list of all users in our B2C directory, and include the group memberships for all users.
We found this query, but unfortunately it is not supported for B2C:
https://graph.microsoft.com/v1.0/users?$select=displayname&$expand=memberof
Are there any workarounds for a B2C tenant?
We've considered two solutions, but neither are scalable:
iterating over each user and retrieving their membership
iterating over all known groups and retrieving members
As you have known, $expand=memberof is not supported for B2C, we can only choose the 2 solutions you mentioned.
To avoid more requests, maybe the solution 2 is better. But the logic is relatively more complicated. Firstly you have to query the list of all the users in case of that there is any user is not a member of any groups. Then you need to list all the groups and get the group members by using /groups/groupid/members. Finally, you can summarize all user and group member information.
The logic of solution 1 is simpler. You just need to call /users and /users/{id | userPrincipalName}/memberOf one by one. But since there are definitely more users than groups, the requests are more than solution 2.
I'm afraid there are no other better workarounds. Which solution you choose depends on performance and logic requirements.

Programmatically access Tags in Teams

I am building an application that creates Teams for my training classes and I can Create a Group, make it a team, and then add the required folks to the Members list. I want to be able to differentiate between "students" and "facilitators" for reporting and management.
I have found /api/v1/teams/{0}/memberTags/ but I don't seem to be able to call it directly or find it in the SDK documentation.
Is this API available?
Teams Tags are currently in the Graph beta
https://learn.microsoft.com/en-us/graph/api/resources/teamworktag
Tags provide a flexible way for customers to classify users or groups based on a common attribute within a team. For example, a Nurse or Manager or Designer tag will enable users to reach groups of people in Teams without having to type every single name.
Tags are scoped at the Team level.
When a tag is added, users can #mention it (#tag) in a channel in that team . Everyone who has been assigned that tag will receive a notification just as they would if they were #mentioned individually. Users can also use a tag is to start a new chat with the members of that tag.
No, there’s no API for this now .
Check here to Manage tags in Microsoft Teams app. We will keep you posted once this feature is available through API.

TFS Devops custom query list items for areas of user

Our TFS is set up as follows:
We have different boards (eg. backend, frontend, security, ...)
We have users that belong to multiple boards (eg. Mark can work on items of the backend and the security)
Is it possible that we create a custom query that lists all of the work items that belong to those boards that Marks belongs to.
In other words, a query that lists work items that belong to board x and y (based on the logged in user)
I've already checked the custom query parameters, and the closest i've found is "Area path" that belongs to #TeamAreas.
But you need to provide a fixed parameter for that.
https://ibb.co/GMvRnc1
We have different boards (eg. backend, frontend, security, ...) We
have users that belong to multiple boards (eg. Mark can work on items
of the backend and the security).
You could use the concept of team to define backend, frontend ,security. Then assign different users to corresponding team.
Then you can add area paths to support teams and to group work items based on product, feature, or business areas. Then, define area paths at the project level and assign them to a team under the team configuration. You can also create a hierarchy of area paths to support subcategories within categories.
More details you could refer this official-- Define area paths and assign to a team
According to your description, some users may belong to multiple boards/multiple teams.
Then you just need to add an or filter= another area path in your custom query, just as below screenshot:

What is the difference between findRooms and findRoomLists API in microsoft graph

I have gone through https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/api/user_findroomlists and https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/api/user_findrooms docs provided by microsoft azure for findRooms and findRoomLists APIs but not able to get what is exact difference between two.
Can someone explain me exact difference between these two APIs.
For me these are same.
Thanks
Ajay Tiwari
From the documentation link you posted:
Get the room lists defined in a tenant.
Tenants can organize meeting rooms into room lists. Each meeting room and room list is represented by an emailAddress instance. You can get all the room lists in the tenant, get all the rooms in the tenant, or get all the rooms in a specific room list.
As stated above, tenants can organize rooms into groups called room lists. An example of room lists would be: a room list for a conference rooms in a building.
More literature to read if needed:
https://technet.microsoft.com/en-us/library/ee633471(v=exchg.141).aspx

I am creating shopify app,and i need to filter the customers from particular customergroup

I am using the following API to get Customer group. ShopifyAPI::CustomerGroup. I got customer group names and id but i am not able to retrive the customers for particular customer group.Kindly suggest some ideas.
You can't. Customer groups is not a valid Shopify API resource or an endpoint. Instead, try to get the customers based on field values listed here - Customer API.
It'd help much if your grouping is based on certain conditions that are easy to extract from API endpoints.

Resources