I am "successfully" querying an Azure AD B2C user via GraphServiceClient
provided by Microsoft.Graph
using:
var b2cUser = await graphServiceClient.Users[id].Request().GetAsync();
The returned user object does not appear to be populated correctly. Nearly all of the properties, including Id
, are set to null
. The data I would expect to see within the structure however is contained within in a raw key-value dictionary property called AdditionalData
.
I was expecting the GraphServiceClient
to do the work of parsing the JSON returned by the Microsoft Graph API. Is what I am seeing the correct behaviour or should I be using the library differently? I would be happy to be referred to the documentation for GraphServiceClient
but my googling foo has failed me so far...
If I try to use select like this:
var b2cUser = await graphServiceClient.Users[id].Request().Select("id").GetAsync();
I get a System.AggregateException
exception for every field I have tried.