Question: How to select field on users ?
Arkantium opened this issue · comments
I need to get the deparment of my user, how to achieve this ? I have try that, but if i try department is null and st not return the field
$this->graphServiceClient = new GraphServiceClient($tokenRequestContext);
$requestConfiguration = new UsersRequestBuilderGetRequestConfiguration();
$queryParameters = new UsersRequestBuilderGetQueryParameters();
$queryParameters->select = ["displayName", "userPrincipalName", "st"];
$requestConfiguration->queryParameters = $queryParameters;
$usersResponse = $this->graphServiceClient->users()
->get($requestConfiguration)
->wait();
dd($usersResponse);
@Arkantium have you tried this while adding department
to the select
?
$queryParameters->select = ["displayName", "userPrincipalName", "department"];
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.