Can I get all profilephotos of all users in a group along with user data in single query from Azure AD?

Kalim Shariff 1 Reputation point
2021-08-31T17:01:17.677+00:00

Can I get all profile photos of all users in a group along with user data in single query from Azure AD?
And can u tell me the response for the endpoint : GET /groups/{id}/photo/$value

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,463 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 40,311 Reputation points
    2021-09-01T03:13:17.02+00:00

    It is not possible to use a single query to obtain all the profile photos and user data of all users in the group, and this feature is not currently supported.

    Your endpoint in the question: GET /groups/{id}/photo/$value is only used to get the group's photo, not the profile photo of the user in the group.

    At present, you can only use GET https://graph.microsoft.com/v1.0/groups/{id}/members to list the data of all users in the group first, and find the id of each user through user data, and then list each user’s profile photo by user id GET /users/{id | userPrincipalName}/photo/$value.


    If an Answer is helpful, please click "Accept Answer" and upvote it.