-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only NULL on getMember from groups. #1561
Comments
Thanks for raising this @MikeAuerAN
Any chance you can share the request you are making when using the graph explorer to help us understand this better? As the members are relationships in the group entity, to retrieve them, I believe you would need to make subsequent call using the group id to retrieve these relationships. List members - https://learn.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0&tabs=php $result = $graphServiceClient->groups()->byGroupId('group-id')->members()->get()->wait(); List owners - https://learn.microsoft.com/en-us/graph/api/group-list-owners?view=graph-rest-1.0&tabs=php $result = $graphServiceClient->groups()->byGroupId('group-id')->owners()->get()->wait(); If you wish to have the members in the same request, you would probably need to specify a $expand parameter in the request. <?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Groups\GroupsRequestBuilderGetRequestConfiguration;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestConfiguration = new GroupsRequestBuilderGetRequestConfiguration();
$queryParameters = GroupsRequestBuilderGetRequestConfiguration::createQueryParameters();
$queryParameters->expand = ["members"];
$requestConfiguration->queryParameters = $queryParameters;
$result = $graphServiceClient->groups()->get($requestConfiguration)->wait(); |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. |
Describe the bug
I want to read all Members of a specific group of our M365 Tenant. Therefore i set the Permissions to Group.Read.All, GroupMember.Read.All, User.Read.All and created this Request:
The Request and Connection just works fine i can test this by providing a non exsisting group or removing the Privileges wich produces an error. Also If i fetch any other data like
getId()
orgetDisplayName()
it just works and the data is Displayed. But everytime i usegetMember()
orgetOwner()
as result i getnull
When Using https://developer.microsoft.com/en-us/graph/graph-explorer with the same values everything just works fine.
Expected behavior
Retrieving any Kind of LIST or Array with the group Members.
How to reproduce
Call
getMember()
on a Group object.SDK Version
2.12.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
```The text was updated successfully, but these errors were encountered: