Aug 28 2018 04:34 AM
HI,
I am using MS graph API to fetch all Office 365 groups to check if any group has single owner. If any group has single owner then we are sending an email notification to add secondary owner for the Group. But when I used MS Graph API to fetch groups details I am getting only 100 groups in the result.
API user: https://graph.microsoft.com/beta/groups?$filter=groupTypes/any(g:g eq 'Unified')
Can anybody tell how to get all Office 365 unified groups using Graph API. Also please share all the limitation of MS Graph API.
some more info:
- MS Graph API invoked from Azure functions app
- Azure AD app used for authentication and below permission granted(Admin consent) to the App
Thanks in advance
K Senthilrajan
Aug 29 2018 01:38 AM
Use pagination as detailed here: https://developer.microsoft.com/en-us/graph/docs/concepts/paging
Jul 28 2019 05:16 PM
@Senthilrajan Kaliyaperumal You can use pagination https://developer.microsoft.com/en-us/graph/docs/concepts/paging
You can call this url:
https://graph.microsoft.com/beta/groups?$top=999&$filter=groupTypes/any(g:g eq 'Unified')
I would suggest to call only email address and id for owners, for that you can use $select
https://graph.microsoft.com/beta/groups?$select=id,mail&$top=999&$filter=groupTypes/any(g:g eq 'Unified')