Using Azure Graph API to get user details by Id, but the "Email Addresses" attribute (StringCollection) is always missing in the response

Shashank Singh 0 Reputation points
2024-07-19T01:54:40.97+00:00

I am using the Azure Graph API to retrieve user details by their Id. However, I am encountering an issue where I am unable to obtain the value of the "Email Addresses" attribute, which is of the StringCollection data type.

Screenshot 2024-07-18 213730Despite successfully retrieving other user attributes, the "Email Addresses" field consistently missing from the response.

How to properly retrieve the "Email Addresses" attribute using the Azure Graph API? If there are specific query parameters or configurations required, kindly provide detailed instructions.

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

1 answer

Sort by: Most helpful
  1. Carolyne-3676 201 Reputation points
    2024-07-23T19:34:44.55+00:00

    Ideally you should be able to pull those attributes as defined in the documentation here - https://learn.microsoft.com/en-us/graph/api/user-get?view=graph-rest-1.0&tabs=http

    The correct way is to get users using this query and you can check the Mail Attribute- GET https://graph.microsoft.com/v1.0/users/87d349ed-44d7-43e1-9a83-5f2406dee5bd
    Share a screenshot of how you are constructing your request and double check the minimum permissions as outlined in the documentation.

    0 comments No comments