简体   繁体   中英

How to get full object data in Microsoft Graph API

I tried to get some infos with google but I couldn't find an answer to my question...

I'm trying to access MS Teams from an ASP.net web app. As a first step I've loaded a list of my joined teams:

var teams = await graphClient.Me.JoinedTeams
   .Request()
   .GetAsync();

The 'problem' that I have is that all of the interesting properties within those Team objects are null (like Channels or PrimaryChannel).

Getting the list of channels from a specific team is not much of a problem:

var channels = await graphClient.Teams[teamId].Channels
   .Request()
   .GetAsync();

But how can I combine these two things? I mean, how can I get a list of my joined teams that already contains the underlying channels? There has to be a way to get that Channels property filled, right?

Thanks a lot!

Bruno

@Vibrationz, You need to make two calls. One to get joined Teams and one to get the Channels of the Teams.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM