microsoft-graph-docs icon indicating copy to clipboard operation
microsoft-graph-docs copied to clipboard

"List all the room lists defined in the tenant" C# example doesn't compile against the v5 SDK

Open Vzzbux opened this issue 2 years ago • 1 comments

'PlaceItemRequestBuilder' does not contain a definition for 'GetAsync' and no accessible extension method 'GetAsync' accepting a first argument of type 'PlaceItemRequestBuilder' could be found (are you missing a using directive or an assembly reference?)

I don't think this looks right: await graphClient.Places["{place-id}"].GetAsync();

Based on the Rooms example above, it feels like it should be more along the lines of: var result = await graphClient.Places.GraphRoomList.GetAsync();

But there doesn't seem to be a GraphRoomListRequestBuilder object defined, and no such property that would return one within PlacesRequestBuilder.

In the v4 SDK I had to do something along the lines of:

            var roomlistsRequestUrl = graphClient
                .Places
                .AppendSegmentToRequestUrl("microsoft.graph.roomList");

            var roomlistsRequest = new GraphServicePlacesCollectionRequestBuilder(roomlistsRequestUrl, graphClient)
                .Request();
            var roomListResponse = await roomlistsRequest.GetAsync();

I'm wondering if it's possible to get something equivalent working against v5? Thanks!


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

Vzzbux avatar Jun 01 '23 18:06 Vzzbux