private void ExportGroupPerms(IGroupsModel model, IMainPresenter presenter)
        {
            IMemberServices service = new MemberServices(ApplicationResource.BaseUrl, ApplicationResource.ApiVersion);

            service.ExportGroupPermsUrl = ApplicationResource.ActionSharingListFolderMembers;
            service.UserAgentVersion    = ApplicationResource.UserAgent;
            string memberId = string.Empty;

            foreach (var item in model.GroupInfo)
            {
                if (!string.IsNullOrEmpty(item.TeamMemberId))
                {
                    memberId = item.TeamMemberId;
                    break;
                }
            }
            List <Tuple <string, string, string, string> > sharedFolders = this.GetSharedFolders(model, presenter);

            foreach (var item in sharedFolders)
            {
                IDataResponse response = service.ExportGroupPerms(new MemberData()
                {
                    MemberId = memberId
                }, item.Item1, ApplicationResource.DefaultAccessToken);

                if (response.StatusCode == HttpStatusCode.OK)
                {
                    if (response.Data != null)
                    {
                        string  data        = response.Data.ToString();
                        dynamic jsonData    = JsonConvert.DeserializeObject <dynamic>(data);
                        int     resultCount = jsonData["groups"].Count;
                        for (int i = 0; i < resultCount; i++)
                        {
                            dynamic groups             = jsonData["groups"][i];
                            dynamic groupName          = Convert.ToString(groups["group"]["group_name"]);
                            dynamic groupId            = Convert.ToString(groups["group"]["group_id"]);
                            dynamic groupMgmtType      = Convert.ToString(groups["group"]["group_management_type"][".tag"]);
                            dynamic groupType          = Convert.ToString(groups["group"]["group_type"][".tag"]);
                            dynamic isMember           = Convert.ToString(groups["group"]["is_member"]);
                            dynamic isOwner            = Convert.ToString(groups["group"]["is_owner"]);
                            dynamic accessType         = Convert.ToString(groups["access_type"][".tag"]);
                            dynamic isInherited        = Convert.ToString(groups["is_inherited"]);
                            dynamic sharedFolderId     = item.Item1;
                            dynamic sharedFolderName   = item.Item2;
                            dynamic isInsideTeamFolder = item.Item3;
                            dynamic isTeamFolder       = item.Item4;

                            // update model
                            GroupPermsItemModel lvItem = new GroupPermsItemModel()
                            {
                                GroupName           = groupName,
                                GroupId             = groupId,
                                GroupManagementType = groupMgmtType,
                                GroupType           = groupType,
                                IsMember            = isMember,
                                IsOwner             = isOwner,
                                AccessType          = accessType,
                                SharedFolderName    = sharedFolderName,
                                SharedFolderId      = sharedFolderId,
                                IsInherited         = isInherited,
                                IsTeamFolder        = isTeamFolder,
                                IsInsideTeamFolder  = isInsideTeamFolder
                            };
                            model.GroupPerms.Add(lvItem);
                        }
                        //if the group count is above limit - default 1000 we need to grab the cursor and call continue
                        string cursor = jsonData["cursor"];

                        while (!string.IsNullOrEmpty(cursor))
                        {
                            service.ExportGroupPermsUrl = ApplicationResource.ActionSharingListFolderMembersContinuation;
                            IDataResponse responseCont = service.ExportGroupPerms(new MemberData()
                            {
                                MemberId = memberId,
                                Cursor   = cursor
                            }, item.Item1, model.AccessToken);

                            string  dataCont        = responseCont.Data.ToString();
                            dynamic jsonDataCont    = JsonConvert.DeserializeObject <dynamic>(dataCont);
                            int     resultCountCont = jsonDataCont["groups"].Count;
                            for (int i = 0; i < resultCountCont; i++)
                            {
                                dynamic groups             = jsonDataCont["groups"][i];
                                dynamic groupName          = Convert.ToString(groups["group"]["group_name"]);
                                dynamic groupId            = Convert.ToString(groups["group"]["group_id"]);
                                dynamic groupMgmtType      = Convert.ToString(groups["group"]["group_management_type"][".tag"]);
                                dynamic groupType          = Convert.ToString(groups["group"]["group_type"][".tag"]);
                                dynamic isMember           = Convert.ToString(groups["group"]["is_member"]);
                                dynamic isOwner            = Convert.ToString(groups["group"]["is_owner"]);
                                dynamic accessType         = Convert.ToString(groups["access_type"][".tag"]);
                                dynamic isInherited        = Convert.ToString(groups["is_inherited"]);
                                dynamic sharedFolderId     = item.Item1;
                                dynamic sharedFolderName   = item.Item2;
                                dynamic isInsideTeamFolder = item.Item3;
                                dynamic isTeamFolder       = item.Item4;

                                // update model
                                GroupPermsItemModel lvItem = new GroupPermsItemModel()
                                {
                                    GroupName           = groupName,
                                    GroupId             = groupId,
                                    GroupManagementType = groupMgmtType,
                                    GroupType           = groupType,
                                    IsMember            = isMember,
                                    IsOwner             = isOwner,
                                    AccessType          = accessType,
                                    SharedFolderName    = sharedFolderName,
                                    SharedFolderId      = sharedFolderId,
                                    IsInherited         = isInherited,
                                    IsTeamFolder        = isTeamFolder,
                                    IsInsideTeamFolder  = isInsideTeamFolder
                                };
                                model.GroupPerms.Add(lvItem);
                            }
                            cursor = jsonDataCont["cursor"];
                        }
                    }
                }
            }
        }