Describe the bug
Hello,
I'm trying to retrieve some Entra ID directory extensions from users using the Graph SDK. It works with normal strings, but if I have an array as data type, it just displays an empty object.
If I use the following code block:
var me = await graphClient.me.GetAsync(requestConfiguration =>
{
requestConfiguration.QueryParameters.Select =
new string[] { "Id", "extension_c4eaf7e0c68a468c8a93aa91dc1cdf8e_roomNumber", "extension_c4eaf7e0c68a468c8a93aa91dc1cdf8e_info" };
});
I receive:
{
"AdditionalData": {
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users(id,extension_c4eaxxxxxxxxxxxxxxxxaa91dc1cdf8e_roomNumber,extension_c4eaxxxxxxxxxxxxxxxxaa91dc1cdf8e_info)/$entity",
"extension_c4eaxxxxxxxxxxxxxxxxaa91dc1cdf8e_roomNumber@odata.type": "#Collection(String)",
"extension_c4eaxxxxxxxxxxxxxxxxaa91dc1cdf8e_roomNumber": {},
"extension_c4eaxxxxxxxxxxxxxxxxaa91dc1cdf8e_info": "11 IT 04 Anwendungsdienste - Kollaboration"
},
"BackingStore": {
"InitializationCompleted": true,
"ReturnOnlyChangedValues": false
},
"Id": "c959de31-XXXX-XXXX-XXXX-276f63552369",
"OdataType": "#microsoft.graph.user"
}
Expected behavior
I expect all the values to be displayed as if I go directly to the HTTP API.
URL: https://graph.microsoft.com/v1.0/me?$select=id,extension_c4eaxxxxxxxxxxxxxxxxaa91dc1cdf8e_roomNumber,extension_c4eaxxxxxxxxxxxxxxxxaa91dc1cdf8e_info
Output:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users(id,extension_c4eaxxxxxxxxxxxxxxxxaa91dc1cdf8e_roomNumber,extension_c4eaxxxxxxxxxxxxxxxxaa91dc1cdf8e_info)/$entity",
"id": "c959de31-XXXX-XXXX-XXXX-276f63552369",
"extension_c4eaxxxxxxxxxxxxxxxxaa91dc1cdf8e_roomNumber@odata.type": "#Collection(String)",
"extension_c4eaxxxxxxxxxxxxxxxxaa91dc1cdf8e_roomNumber": [
"E.6.160"
],
"extension_c4eaxxxxxxxxxxxxxxxxaa91dc1cdf8e_info": "11 IT 04 Anwendungsdienste - Kollaboration"
}
How to reproduce
var graphClient = new GraphServiceClient(credential, scopes);
var me = await graphClient.Me.GetAsync(requestConfiguration => {
requestConfiguration.QueryParameters.Select = new string[] { "Id", "extension_c4eaxxxxxxxxxxxxxxxxaa91dc1cdf8e_roomNumber", "extension_c4eaxxxxxxxxxxxxxxxxaa91dc1cdf8e_info" };
});
Console.WriteLine(JsonSerializer.Serialize(me!));
SDK Version
5.78.0
Latest version known to work for scenario above?
5.46.0
Known Workarounds
No response
Debug output
No response
Configuration
-OS: Windows 11
-Architecture: x64
-IDE: Visual Studio 2022 17.14.0
Other information
No response
Describe the bug
Hello,
I'm trying to retrieve some Entra ID directory extensions from users using the Graph SDK. It works with normal strings, but if I have an array as data type, it just displays an empty object.
If I use the following code block:
I receive:
{ "AdditionalData": { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users(id,extension_c4eaxxxxxxxxxxxxxxxxaa91dc1cdf8e_roomNumber,extension_c4eaxxxxxxxxxxxxxxxxaa91dc1cdf8e_info)/$entity", "extension_c4eaxxxxxxxxxxxxxxxxaa91dc1cdf8e_roomNumber@odata.type": "#Collection(String)", "extension_c4eaxxxxxxxxxxxxxxxxaa91dc1cdf8e_roomNumber": {}, "extension_c4eaxxxxxxxxxxxxxxxxaa91dc1cdf8e_info": "11 IT 04 Anwendungsdienste - Kollaboration" }, "BackingStore": { "InitializationCompleted": true, "ReturnOnlyChangedValues": false }, "Id": "c959de31-XXXX-XXXX-XXXX-276f63552369", "OdataType": "#microsoft.graph.user" }Expected behavior
I expect all the values to be displayed as if I go directly to the HTTP API.
URL: https://graph.microsoft.com/v1.0/me?$select=id,extension_c4eaxxxxxxxxxxxxxxxxaa91dc1cdf8e_roomNumber,extension_c4eaxxxxxxxxxxxxxxxxaa91dc1cdf8e_info
Output:
How to reproduce
SDK Version
5.78.0
Latest version known to work for scenario above?
5.46.0
Known Workarounds
No response
Debug output
No response
Configuration
-OS: Windows 11
-Architecture: x64
-IDE: Visual Studio 2022 17.14.0
Other information
No response