1

Using the Microsoft Graph quick start guide, I can get my user object with

var one = await graphClient.Me.Request().GetAsync();

But it only includes values for these properties

BusinessPhones       
DisplayName          
GivenName            
Id                   
JobTitle             
Mail                 
OfficeLocation       
Surname              
UserPrincipalName    

Where the rest are just null. However, I expect to see some values in, for example AboutMe.

I can retrieve that value specifically with

var one = await graphClient.Me.Request().Select("aboutme").GetAsync();

But is there a way to get all properties?

I tried

var one = await graphClient.Me.Request().Select("").GetAsync();
var one = await graphClient.Me.Request().Select("*").GetAsync();

But that doesn't return all properties.

Bassie
  • 9,529
  • 8
  • 68
  • 159
  • Possible duplicate of [Get all user properties from microsoft graph](https://stackoverflow.com/questions/48229949/get-all-user-properties-from-microsoft-graph). Also note that you _really_ don't want "everything". Try hitting `beta/me` in Graph Explorer and you'll quickly realize just how many "things" are in "everything". It's a _lot_ of data. – Marc LaFleur Mar 08 '18 at 18:52
  • @MarcLaFleur It's just for testing purposes to see what data is available. When the application is in use we will just get the fields that we need – Bassie Mar 08 '18 at 22:45
  • Ah, for that just use the `/beta` endpoint. It returns the entire `DirectoryObject` without any filters. – Marc LaFleur Mar 09 '18 at 13:37

1 Answers1

2

It seems that this is not yet? implemented.

The Documentations for the select parameter states:

In v1.0, some Azure AD resources that derive from directoryObject, like user and group, return a limited, default subset of properties on reads. For these resources, you must use $select to return properties outside of the default set.

https://developer.microsoft.com/en-us/graph/docs/concepts/query_parameters#select-parameter

This seems to be the reason why a select=* is returning only some directoryObject-properties, as the user-object is derived from the directoryObject.

To access all properties you would need to manually define them in your select-query or alternatively you could adjust the default set for the server to return all properies (not sure if you can define this in the online application settings though).

Karlheinz Reinhardt
  • 1,025
  • 1
  • 11
  • 22