public ADRawEntry FindByLiveIdMemberName(string liveIdMemberName, params PropertyDefinition[] properties) { if (string.IsNullOrWhiteSpace(liveIdMemberName)) { throw new ArgumentException("liveIdMemberName is null or white space."); } if (properties == null) { throw new ArgumentNullException("properties"); } ProxyAddress proxyAddress = new SmtpProxyAddress(liveIdMemberName, true); QueryFilter filter = new OrFilter(new QueryFilter[] { base.QueryFilterFromProxyAddress(proxyAddress), base.QueryFilterFromUserPrincipalName(liveIdMemberName) }); IEnumerable <PropertyDefinition> first = new PropertyDefinition[] { ADUserSchema.UserPrincipalName }; ADRawEntry[] entries = base.Find <ADRawEntry>(null, QueryScope.SubTree, filter, null, 0, first.Concat(properties), false); return(this.ChooseUserForLiveIdMemberName(entries, liveIdMemberName)); }