List group objects and their properties using Microsoft graph
Operation: List group
Description: The 'List group' request will return all the groups in an organization. However, not all the properties of the group arO returned. only a subset of the properties such as group ID, group type, and display name are fetched. Group members and owner details cannot be viewed using this request.
Request:
- GET https://graph.microsoft.com/v1.0/groups
Response:
- HTTP/1.1 200 OK
- Content-type: application/json
- {
- "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#groups",
- "value": [
- {
- "id": "45b7d2e7-b882-4a80-ba97-10b7a63b8fa4",
- "deletedDateTime": null,
- "classification": null,
- "createdDateTime": "2018-12-22T02:21:05Z",
- "creationOptions": [],
- "description": "Self help community for golf",
- "displayName": "Golf Assist",
- "groupTypes": [
- "Unified"
- ],
- "mail": "golfassist@contoso.com",
- "mailEnabled": true,
- "mailNickname": "golfassist",
- "onPremisesLastSyncDateTime": null,
- "onPremisesSecurityIdentifier": null,
- "onPremisesSyncEnabled": null,
- "preferredDataLocation": "CAN",
- "proxyAddresses": [
- "smtp:golfassist@contoso.onmicrosoft.com",
- "SMTP:golfassist@contoso.com"
- ],
- "renewedDateTime": "2018-12-22T02:21:05Z",
- "resourceBehaviorOptions": [],
- "resourceProvisioningOptions": [],
- "securityEnabled": false,
- "visibility": "Public",
- "onPremisesProvisioningErrors": []
- },
- {
- "id": "d7797254-3084-44d0-99c9-a3b5ab149538",
- "deletedDateTime": null,
- "classification": null,
- "createdDateTime": "2018-11-19T20:29:40Z",
- "creationOptions": [],
- "description": "Talk about golf",
- "displayName": "Golf Discussion",
- "groupTypes": [],
- "mail": "golftalk@contoso.com",
- "mailEnabled": true,
- "mailNickname": "golftalk",
- "onPremisesLastSyncDateTime": null,
- "onPremisesSecurityIdentifier": null,
- "onPremisesSyncEnabled": null,
- "preferredDataLocation": "CAN",
- "proxyAddresses": [
- "smtp:golftalk@contoso.onmicrosoft.com",
- "SMTP:golftalk@contoso.com"
- ],
- "renewedDateTime": "2018-11-19T20:29:40Z",
- "resourceBehaviorOptions": [],
- "resourceProvisioningOptions": [],
- "securityEnabled": false,
- "visibility": null,
- "onPremisesProvisioningErrors": []
- }
- ]
- }
Operation: List members
Description: Shows the details of all the members of the specified group. This request can return maximum of 200 records.
- GET https://graph.microsoft.com/v1.0/groups/{id}/members
Operation: List owners
- GET https://graph.microsoft.com/v1.0/groups/{id}/owners
Description: Shows the details of the owners of the specified group. This request can return maximum of 200 records.
Why graph API is not a good option
- Incomprehensible results: The response returned by the MS Graph Explorer will be in JSON format which is difficult to comprehend.
- Difficulty in handling bulk results: When the result spans multiple pages, the graph explorer returns links to those pages instead of displaying all the records.
- Non-user friendly: Users need a third-party tool to view the response of the graph explorer in graphical or tabular format.
- Need of expertise: In-depth coding knowledge is required to customize the requests for specific needs.
Get Microsoft 365 group reports using M365 Manager Plus
Why juggle multiple scripts to know about a single group? M365 Manager Plus provides more than 700 pre-defined reports on Exchange Online, Azure AD, MS Teams, Yammer, and other Microsoft 365 services which are way easier to generate and customize than the results returned by the graph explorer.
It has a dedicated set of reports to know all about the groups in your organization. And the best part is, you need not write even a single line of code. All the required details are presented to you in a detailed tabular format accompanied with a graphical view of the report.
Refer the image below to know about the group reports provided by M365 Manager Plus.
![Microsoft 365 group reports Microsoft 365 group reports](https://www.manageengine.com/za/microsoft-365-management-reporting/graph-api/images/microsoft-365-group-reports.png)
Highlights of M365 Manager Plus:
- Advanced filters: Use attribute and condition-based filters to get the data you need without lengthy PowerShell scripts.
- Reports on historical data: API requests can only retrieve data that's at least seven days old and no older than 180 days. But, M365 Manager Plus reports can fetch all data right from its installation.
- Customizable dashboard: M365 Manager Plus dashboard is customizable. Generate graphical reports to get a quick peek at the mail traffic summary, top email senders and receivers, client device usage, and more. This dashboard can be embedded in any of your web pages to enable constant monitoring.
- Report scheduler: Schedule report generation at regular intervals to reduce the overhead.
- Report export: The reports can be exported to PDF, XLSX, HTML, or CSV formats and redistributed via emails to the administrators.
- Secure delegation: Securely delegate report generation to technicians and IT staff without giving them full access to the Microsoft 365 Admin Center.
![Microsoft 365 all groups report Microsoft 365 all groups report](https://www.manageengine.com/za/microsoft-365-management-reporting/graph-api/images/microsoft-365-all-groups-report.png)