ArcGIS Runtime SDK for WPF - Library Reference
SearchUsersTaskAsync Method
See Also 
ESRI.ArcGIS.Client.Portal Namespace > ArcGISPortal Class : SearchUsersTaskAsync Method

searchParameters
The search parameters.
Searchs users from a query string.

Syntax

Visual Basic (Declaration) 
Public Function SearchUsersTaskAsync( _
   ByVal searchParameters As SearchParameters _
) As Task(Of SearchResultInfo(Of ArcGISPortalUser))

Remarks

This method obtains a Portal.SearchResultInfo<T> object that contains Portal.ArcGISPortalUser objects. Use the Portal.SearchResultInfo<T>.Results Property to get the IEnumberable collection of Portal.ArcGISPortalUser objects.

Portal.ArcGISPortalUser 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. The Portal.ArcGISPortal.SearchUsersAsync Method allows searching for specific user accounts within ArcGIS Online (AGOL) or ArcGIS Portal. The Portal.ArcGISPortal.SearchUsersAsync Method requires providing specific Portal.SearchParameters to limit the scope of which users are returned.

You can call this method before calling the Portal.ArcGISPortal.InitializeTaskAsync Method and obtain Portal.ArcGISPortalUser information BUT the Portal.ArcGISPortalUser.ArcGISPortal Property will not be populated with valid information (i.e. its value will be Nothing/null). It is a recommended best practice to call the Portal.ArcGISPortal.InitializeAsync Method before calling the Portal.ArcGISPortal.SearchUsersAsync Method so that all of the properties in the Portal.ArcGISPortal.ArcGISPortalUser will contain valid data.

You do not have to be a logged in user using the IdentityManager to get information from the Portal.ArcGISPortal.SearchUsersAsync Method. You can gain this information from anonymous access. However, to obtain information about users in your organization that have a Portal.PortalAccess level of Private you need to use the IdentityManager by supplying the appropriate username/password credentials. As AGOL and ArcGIS Portal require the use of long term tokens to access secured information (i.e. information that is Private) you should remember to set the IdentityManager.TokenGenerationReferer Property to the correct string required by your development platform.

NOTE: While the Portal.ArcGISPortal.SearchUsersAsync Method does return an IEnumberable collection of Portal.ArcGISPortalUser objects as result of the search operation, not all of the Properties of the Portal.ArcGISPortalUser objects will contain data. This is by design to protect certain confidential information about a user. As of AGOL/ArcGIS Portal version 2.1 only the following ArcGISPortalUser Properties will be populated with information for the user search operation: .Username, .FullName, .Description, .Tags. .Culture, .Region, .ThumbnailUri, .CreationDate, and .ModificationDate. For more details on the types of information that can be obtained from the user search operation, review the ArcGIS Portal API REST documentation for the user search operation.

Parameters

searchParameters
The search parameters.

Requirements

Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7, Windows 8

See Also

© ESRI, Inc. All Rights Reserved.