Cant able to get all properties of user by using Graph API in C# ?

Venkatesh Naik 20 Reputation points
2024-11-21T10:26:25.2533333+00:00

Code Line => User user = await graphClient.Users[userObjectId].Request().GetAsync().ConfigureAwait(false);

User's image

User's image

I can able to fetch Green highlighted one but other than that getting null in "user1" (code line) object.
question =>

  1. Is there any other ways through which i can able to get all properties of user ?
  2. Do i need to apply any other permission to the application ?

Note : I have applied user.readAll and user.readBasicAll permission to the application on azure.

Microsoft Authenticator
Microsoft Authenticator
A Microsoft app for iOS and Android devices that enables authentication with two-factor verification, phone sign-in, and code generation.
7,238 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,369 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,052 questions
Microsoft Entra
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,262 questions
0 comments No comments
{count} votes

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.