I am writing a tool that allows one user to share content created offline with other users. Here's how it currently works:
- User consumes feature service shared with them through a portal group and creates an offline geodatabase
- User created new content within that offline geodatabase
- User wants to share that content with other users who also have access to that same feature service
Pseudo Code is as follows:
- I get a list of all groups in the Portal with which that feature service has been shared
- I then cursor through all the collections of Admins, Members, and Users for each of those groups creating a master list of users that are eligible for sharing
- All of those properties kick back the portal user id as a string
What I want to do is get the first and last name of each portal user to display in a list. To do that I need to get a PortalUser object and I haven't found the combination of calls to make that happen. I headed down this direction:
PortalQueryParameters gParams = PortalQueryParameters.CreateForItemsWithId(portalItem.ItemId);
PortalQueryResultSet<PortalUser> pUsers = await ApplicationManager.SessionManager.Portal.FindUsersAsync(gParams);
The portal item is the feature service and I figured this would give me all the PortalUser objects that had access to it, but it comes back with nothing. I tried a couple of different but similar calls and none return any PortalUsers.
Anyone have any ideas on this? Thanks in advance for your help ...