ArcGISPortalFindUsersAsync Method (PortalQueryParameters, CancellationToken)
public Task<PortalQueryResultSet<PortalUser>> FindUsersAsync( PortalQueryParameters queryParams, CancellationToken cancellationToken )
PortalUser objects are user accounts within ArcGIS Online (AGOL) or ArcGIS Portal. Users add content to AGOL/ArcGIS Portal in the form of maps, tools, and applications. This method allows searching for specific user accounts within ArcGIS Online (AGOL) or ArcGIS Portal and requires providing specific PortalQueryParameters to limit the scope of which users are returned.
You do not have to be a logged in user to get information from this method. You can gain this information from anonymous access. However, to obtain information about users in your organization that have a PortalAccess level of Private you need to use the AuthenticationManager by supplying the appropriate username/password credentials.
NOTE: While the FindUsersAsync(PortalQueryParameters) method does return an collection of PortalUser objects as result of the search operation, not all of the properties of the PortalUser objects will contain data. This is by design to protect certain confidential information about a user.