Not able to get all properties of user using Microsoft.Graph api in c#. Also some properties are giving error.

NJ 0 Reputation points
2024-12-11T08:00:11.8133333+00:00

User's image

User's image

I want to get user info with all properties by using Graph api in c#, I am able to get some properties values in response but some properties values are getting null. I am also using select query to fetch each property of user.

Some properties like "MailBoxSettings", "interests", "hiredate", etc when I put it into select query to get values, getting error.

Could you provide me the property wise prerequisites like property needs some settings on azure portal or some properties needs premium license/plans of azure?

AboveI have shared response screenshot and user properties on azure portal.

Microsoft Security | Microsoft Entra | Microsoft Entra ID
Developer technologies | .NET | Other
Microsoft Security | Microsoft Graph
Developer technologies | C#
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 46,376 Reputation points
    2024-12-11T09:00:16.3466667+00:00

    Hi @NJ

    This is because version 1.0 returns only basic properties. If you want to get the values ​​of other properties, you can try using the beta version.

    User's image

    Note that the values of navigation properties may still be populated with null, as they are not part of the user's basic properties.

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.