Azure-Samples / active-directory-dotnet-graphapi-web

A .NET 4.5 MVC web app that demonstrates how to query the Azure AD Graph API using the Azure AD Graph Client Library
82 stars 68 forks source link

Async fails sometimes when there is paging #22

Open johnpan opened 9 years ago

johnpan commented 9 years ago

controllers -> groups line 43 pagedCollection = pagedCollection.GetNextPageAsync().Result; does not always work properly. It is better to use line 260 syntax: pagedCollection = await pagedCollection.GetNextPageAsync();

dkershaw10 commented 8 years ago

True and recommended. Looks like we have a bug in the sample where we are using the former rather than latter expression. We'll make an update here and check for any other places where we might be using incorrect syntax.