Exemplo n.º 1
0
        private async Task <String[]> GetPropertyOwnersAsync(Graph.GraphServiceClient graphService)
        {
            var resturl        = "/_api/lists/GetByTitle('Properties')/Items?$select=sl_owner";
            var responseString = await RestHelper.GetDemoSiteJsonAsync(resturl, _token);

            var properties = JObject.Parse(responseString)["d"]["results"].ToObject <Property[]>();

            var users = await graphService.GetAllUsersAsync(properties.Select(i => i.sl_owner));

            return(users.Select(i => i.Mail).ToArray());
        }