microsoft-graph-apimicrosoft-graph-mail

Unable to find value for employeeId


I am using microsoft graph api through the SDK in a C# application. But I am unable to see any values for employeeId field that is there in the beta version as shown below : Microsoft Graph API Explorer

We are trying to filter the users based on a specific value of employee ID. When querying through powershell, the value shows up : Powershell

I also checked the extended properties on Graph API Explorer, but the employeeId property doesn't show up there.

I expect Microsoft Graph API And Windows Graph API To be inline with each other. But clearly, that is not the case here.

Please help!

Thanks, Yogesh


Solution

  • For your app to access data in Microsoft Graph, the user or administrator must grant it the correct permissions via a consent process. I guess you're only using the User.Read permission, this is only limited to return basic information. You might try to allow User.Read.All permission which required an Admin Consent.

    This link might be helpful:https://learn.microsoft.com/en-us/graph/permissions-reference#user-permissions