I'm attempting to pull all users within a specific group and to also get their transitive membership.
The endpoint I am hitting is:
https://graph.microsoft.com/v1.0/groups/{id}/transitiveMembers/microsoft.graph.user?$select=givenName,surname,country,city,companyName,officeLocation,displayName,mail,department,jobTitle,employeeId&$expand=transitiveMemberOf
This pulls the data I need, but there is an object of OData type microsoft.graph.group in the returned payload that causes the following error:
A resource of type 'microsoft.graph.group' was found in a resource set that otherwise has entries of type 'microsoft.graph.user'. In OData, all entries in a resource set must have a common base type.
Which then causes a JSON parse error of unexpected token. The response does contain the next link and I would like to be able to handle this error and move on to the next page. However, the JSON::ParserError prevents me from doing this.
Any ideas what might cause a microsoft.graph.group object to be returned when microsoft.graph.user was specified in the request url?
