com.microsoft.tfs.core.clients.webservices
Interface IIdentityManagementService2

All Superinterfaces:
IIdentityManagementService
All Known Implementing Classes:
IdentityManagementService2

public interface IIdentityManagementService2
extends IIdentityManagementService

Since:
TEE-SDK-11.0

Method Summary
 void addRecentUser(TeamFoundationIdentity identity)
          Adds the specified identity to MRU list of users for the current user.
 void clearCustomDisplayName()
          Clears the custom display name for the current user, returning to using the display name from the external identity provider (Active Directory, Live, etc).
 TeamFoundationIdentity[] getMostRecentlyUsedUsers()
          Get the set of identities which have been recently accessed by the current user
 TeamFoundationIdentity[] listApplicationGroups(java.lang.String scopeId, ReadIdentityOptions readOptions, java.lang.String[] propertyNameFilters, IdentityPropertyScope propertyScope)
          Lists all TFS application groups within the specified scope
 FilteredIdentitiesList readFilteredIdentities(java.lang.String expression, int suggestedPageSize, java.lang.String lastSearchResult, boolean lookForward, int queryMembership)
          ReadFilteredIdentities is used to retrieve a set of identities based on an expression.
 TeamFoundationIdentity[] readIdentities(com.microsoft.tfs.util.GUID[] teamFoundationIds, MembershipQuery queryMembership, ReadIdentityOptions readOptions, java.lang.String[] propertyNameFilters, IdentityPropertyScope propertyScope)
          Read identities by Team Foundation Id.
 TeamFoundationIdentity[] readIdentities(IdentityDescriptor[] descriptors, MembershipQuery queryMembership, ReadIdentityOptions readOptions, java.lang.String[] propertyNameFilters, IdentityPropertyScope propertyScope)
          Read identities for given descriptors.
 TeamFoundationIdentity[][] readIdentities(IdentitySearchFactor searchFactor, java.lang.String[] searchFactorValues, MembershipQuery queryMembership, ReadIdentityOptions readOptions, java.lang.String[] propertyNameFilters, IdentityPropertyScope propertyScope)
          Read identities based on search factor.
 TeamFoundationIdentity readIdentity(IdentityDescriptor descriptor, MembershipQuery queryMembership, ReadIdentityOptions readOptions, java.lang.String[] propertyNameFilters, IdentityPropertyScope propertyScope)
          Overload that takes a single descriptor.
 TeamFoundationIdentity readIdentity(IdentitySearchFactor searchFactor, java.lang.String searchFactorValue, MembershipQuery queryMembership, ReadIdentityOptions readOptions, java.lang.String[] propertyNameFilters, IdentityPropertyScope propertyScope)
          Overload that takes a single search factor and returns match following this order.
 TeamFoundationIdentity readIdentity(java.lang.String generalSearchValue)
          Read an identity using the General search factor.
 void setCustomDisplayName(java.lang.String customDisplayName)
          Sets the display name for the current user in a sticky manner, overriding any display name returned by an external identity provider (Active Directory, Live, etc).
 void updateExtendedProperties(TeamFoundationIdentity identity)
          Save changes to extended properties.
 
Methods inherited from interface com.microsoft.tfs.core.clients.webservices.IIdentityManagementService
addMemberToApplicationGroup, createApplicationGroup, deleteApplicationGroup, getIdentityDomainScope, getScopeName, isMember, isOwnedWellKnownGroup, isOwner, listApplicationGroups, readIdentities, readIdentities, readIdentities, readIdentity, readIdentity, refreshIdentity, removeMemberFromApplicationGroup, updateApplicationGroup
 

Method Detail

getMostRecentlyUsedUsers

TeamFoundationIdentity[] getMostRecentlyUsedUsers()
Get the set of identities which have been recently accessed by the current user


addRecentUser

void addRecentUser(TeamFoundationIdentity identity)
Adds the specified identity to MRU list of users for the current user.


readIdentity

TeamFoundationIdentity readIdentity(java.lang.String generalSearchValue)
Read an identity using the General search factor.

Equivalent to ReadIdentity(IdentitySearchFactor.General, generalSearchValue, MembershipQuery.None, ReadIdentityOptions.None).

You can use this to find an identity by one of the following properties:

UniqueName may be easier to type than display name. It can also be used to find a single identity when two or more identities share the same display name (e.g. "John Smith")

Parameters:
generalSearchValue - The search string
Returns:

readFilteredIdentities

FilteredIdentitiesList readFilteredIdentities(java.lang.String expression,
                                              int suggestedPageSize,
                                              java.lang.String lastSearchResult,
                                              boolean lookForward,
                                              int queryMembership)
ReadFilteredIdentities is used to retrieve a set of identities based on an expression. The expression is a syntax that resembles a SQL WHERE clause. For full details on the expressions capabilities see documentation on the QueryExpression class.

Parameters:
expression -
suggestedPageSize -
lastSearchResult -
lookForward -
queryMembership -
Returns:

setCustomDisplayName

void setCustomDisplayName(java.lang.String customDisplayName)
Sets the display name for the current user in a sticky manner, overriding any display name returned by an external identity provider (Active Directory, Live, etc).

TFS 2010 would automatically disambiguate users with the same display name by appending the domain and account name. TFS 2012 does not disambiguate display names. SetCustomDisplayName can be used instead to make a display name unique.

"John Q. Smith, Sr."

"John Smith (Contoso, Human Resources)"

Parameters:
customDisplayName - The new display name

clearCustomDisplayName

void clearCustomDisplayName()
Clears the custom display name for the current user, returning to using the display name from the external identity provider (Active Directory, Live, etc).


updateExtendedProperties

void updateExtendedProperties(TeamFoundationIdentity identity)
Save changes to extended properties.

Parameters:
identity - Identity with extended property changes

readIdentities

TeamFoundationIdentity[] readIdentities(IdentityDescriptor[] descriptors,
                                        MembershipQuery queryMembership,
                                        ReadIdentityOptions readOptions,
                                        java.lang.String[] propertyNameFilters,
                                        IdentityPropertyScope propertyScope)
Read identities for given descriptors. First try IMS store. If not found, optionally try source like AD. Note - performance will be fastest when no membership information is requested.

Parameters:
descriptors - descriptors (descriptor is identity type + identifier)
queryMembership - none, direct or expanded membership information
readOptions - read options, such as reading from source
propertyNameFilters -
propertyScope -
Returns:
Array of identities, corresponding 1 to 1 with input descriptor array

readIdentity

TeamFoundationIdentity readIdentity(IdentityDescriptor descriptor,
                                    MembershipQuery queryMembership,
                                    ReadIdentityOptions readOptions,
                                    java.lang.String[] propertyNameFilters,
                                    IdentityPropertyScope propertyScope)
Overload that takes a single descriptor. Read identity for given descriptor. First try IMS store. If not found, optionally try source like AD. Note - performance will be fastest when no membership information is requested.

Parameters:
descriptor - identity type + identifier
queryMembership - none, direct or expanded membership information
readOptions - read options, such as reading from source
propertyNameFilters -
propertyScope -
Returns:
identity if found, else null

readIdentities

TeamFoundationIdentity[] readIdentities(com.microsoft.tfs.util.GUID[] teamFoundationIds,
                                        MembershipQuery queryMembership,
                                        ReadIdentityOptions readOptions,
                                        java.lang.String[] propertyNameFilters,
                                        IdentityPropertyScope propertyScope)
Read identities by Team Foundation Id. Note - performance will be fastest when no membership information is requested.

Parameters:
teamFoundationIds - identity ids
queryMembership - none, direct or expanded membership information
readOptions -
propertyNameFilters -
propertyScope -
Returns:
Array of identities, corresponding 1 to 1 with input array

readIdentities

TeamFoundationIdentity[][] readIdentities(IdentitySearchFactor searchFactor,
                                          java.lang.String[] searchFactorValues,
                                          MembershipQuery queryMembership,
                                          ReadIdentityOptions readOptions,
                                          java.lang.String[] propertyNameFilters,
                                          IdentityPropertyScope propertyScope)
Read identities based on search factor. First read from IMS store, then (optionally) read from source like AD.

Parameters:
searchFactor - how search is specified (by account name, etc.)
searchFactorValues - actual search strings (account names, etc.)
queryMembership - none, direct or expanded membership information
readOptions - readOptions, such as reading from source
Returns:
Arrays of identities. Inner array corresponds 1 to 1 with search factor values

readIdentity

TeamFoundationIdentity readIdentity(IdentitySearchFactor searchFactor,
                                    java.lang.String searchFactorValue,
                                    MembershipQuery queryMembership,
                                    ReadIdentityOptions readOptions,
                                    java.lang.String[] propertyNameFilters,
                                    IdentityPropertyScope propertyScope)
Overload that takes a single search factor and returns match following this order.
  1. With multiple matches, active identity if exists, else first match.
  2. When there is a single match, the match.
  3. When there is no match, null.
Read identity based on search factor. First read from IMS store, then (optionally) read from source like AD.

Parameters:
searchFactor - how search is specified (by account name, etc.)
searchFactorValue - actual search string (account name, etc.)
queryMembership - none, direct or expanded membership information
readOptions - readOptions, such as reading from source
Returns:
Array of matching identities

listApplicationGroups

TeamFoundationIdentity[] listApplicationGroups(java.lang.String scopeId,
                                               ReadIdentityOptions readOptions,
                                               java.lang.String[] propertyNameFilters,
                                               IdentityPropertyScope propertyScope)
Lists all TFS application groups within the specified scope

Parameters:
scopeId - Scope Uri, specifying whether group scope is project level or global to this host. Null or empty value signifies global scope
readOptions - read options
propertyNameFilters - extended properties to retrieve with application groups
propertyScope - indicates where to read extended properties from
Returns:
Application groups as an array of identities


© 2015 Microsoft. All rights reserved.