Getting user teams has different object model #1925
-
Hello, var teams = (await _graphServiceClient
.Users[user.Id]
.JoinedTeams.Request().GetAsync())
.CurrentPage;
return teams.Select(team =>
new GraphTeamDTO
{
Id = team.Id,
Name = team.AdditionalData["displayName"].ToString(),
Description = team.AdditionalData["description"].ToString()
}
).ToList(); Selected Properties "displayName" and "description" were in the Teams model under AdditionalData. but without debugging mode, properties are not in the model The only change that i did was adding PnP.Framework package (+ some functionality coded in there) Microsoft.Graph version used: 3.8.0 Can someone please advise me, what am i missing? how to get "displayName" and "description" properties? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It looks like the This is causing the project to use the higher package version referred to by I would suggest updating you project reference to 3.33.0 so that the reference match and you can simply read the properties from the Team object consisitently. |
Beta Was this translation helpful? Give feedback.
It looks like the
PnP.Framework
depends on Microsoft.Graph (>= 3.33.0) while your project depends on 3.8.0.This is causing the project to use the higher package version referred to by
PnP.Framework
by which defines the properties and are therefore not being placed in the additionaldata.I would suggest updating you project reference to 3.33.0 so that the reference match and you can simply read the properties from the Team object consisitently.