Discuss this help topic in SecureBlackbox Forum

WebDAV: Search for a principal (user)

First of all you need to retrieve a set of searchable properties. You can search for a principal using their properties using the operation defined in RFC 3744 (section 9.4). TElWebDAVClient.PrincipalPropertySearchFirst(), TElWebDAVClient.PrincipalPropertySearchNext() and TElWebDAVClient.PrincipalPropertySearchClose() methods are used to perform the search.

First of all you should call TElWebDAVClient.PrincipalPropertySearchFirst() to perform the request and get properties values for the 1st user from a search result. The method accept a few parameters:

  • MatchProperties - the set of properties to search (you should have retrieved it before conducting the search)
  • Matches - the list of values to match. A number of values must be equal to MatchProperties count. Each value corresponds to a property from MatchProperties list.
  • Properties - properties to return for found principals
  • ApplyToPrincipalCollectionSet - if set to 'true', the request is applied to each collection identified by the DAV:principal-collection-set property of the resource identified by the Request-URI.

The method returns a search handle via its Ctx parameter. This handle should be passed to subsequent TElWebDAVClient.PrincipalPropertySearchNext* method calls.

TElWebDAVClient.PrincipalPropertySearchNext() should be called until it returns 'false'. Each call returns values for requested properties for a single principal.

After all results are processed TElWebDAVClient.PrincipalPropertySearchClose() should be called to free allocated resources.

How To articles about WebDAV client

Discuss this help topic in SecureBlackbox Forum