public User FindByExternalDirectoryObjectId(Guid userGuid, Guid tenantGuid, IRoutingDiagnostics diagnostics) { return(this.Execute <User>(delegate { ADSessionSettings sessionSettings = ActiveDirectoryUserProvider.FromExternalDirectoryOrganizationId(tenantGuid, diagnostics); IRecipientSession tenantOrRootOrgRecipientSession = this.directorySessionFactoryInstance.GetTenantOrRootOrgRecipientSession(true, ConsistencyMode.IgnoreInvalid, sessionSettings, 111, "FindByExternalDirectoryObjectId", "f:\\15.00.1497\\sources\\dev\\cafe\\src\\Routing\\Providers\\ActiveDirectoryUserProvider.cs"); ADRawEntry rawEntry = ActiveDirectoryUserProvider.FindAdUserByExternalDirectoryObjectId(userGuid, tenantOrRootOrgRecipientSession, diagnostics); return ActiveDirectoryUserProvider.CreateUserFromAdRawEntry(rawEntry); }, "FindByExternalDirectoryObjectId failed")); }
public User FindByExchangeGuidIncludingAlternate(Guid exchangeGuid, string tenantDomain, IRoutingDiagnostics diagnostics) { return(this.Execute <User>(delegate { ADSessionSettings sessionSettings = ADSessionSettings.RootOrgOrSingleTenantFromAcceptedDomainAutoDetect(tenantDomain); IRecipientSession tenantOrRootOrgRecipientSession = this.directorySessionFactoryInstance.GetTenantOrRootOrgRecipientSession(true, ConsistencyMode.IgnoreInvalid, sessionSettings, 64, "FindByExchangeGuidIncludingAlternate", "f:\\15.00.1497\\sources\\dev\\cafe\\src\\Routing\\Providers\\ActiveDirectoryUserProvider.cs"); ADRawEntry rawEntry = ActiveDirectoryUserProvider.FindByExchangeGuidIncludingAlternate(exchangeGuid, tenantOrRootOrgRecipientSession, diagnostics); return ActiveDirectoryUserProvider.CreateUserFromAdRawEntry(rawEntry); }, "FindByExchangeGuidIncludingAlternate failed")); }
public User FindBySmtpAddress(SmtpAddress smtpAddress, IRoutingDiagnostics diagnostics) { return(this.Execute <User>(delegate { SmtpProxyAddress proxyAddress = new SmtpProxyAddress(smtpAddress.ToString(), true); ADSessionSettings sessionSettings = ADSessionSettings.RootOrgOrSingleTenantFromAcceptedDomainAutoDetect(smtpAddress.Domain); IRecipientSession tenantOrRootOrgRecipientSession = this.directorySessionFactoryInstance.GetTenantOrRootOrgRecipientSession(true, ConsistencyMode.IgnoreInvalid, sessionSettings, 88, "FindBySmtpAddress", "f:\\15.00.1497\\sources\\dev\\cafe\\src\\Routing\\Providers\\ActiveDirectoryUserProvider.cs"); ADRawEntry rawEntry = ActiveDirectoryUserProvider.FindByProxyAddress(proxyAddress, tenantOrRootOrgRecipientSession, diagnostics); return ActiveDirectoryUserProvider.CreateUserFromAdRawEntry(rawEntry); }, "FindBySmtpAddress failed")); }
public User FindByLiveIdMemberName(SmtpAddress liveIdMemberName, string organizationContext, IRoutingDiagnostics diagnostics) { return(this.Execute <User>(delegate { string text = organizationContext; if (string.IsNullOrEmpty(text)) { text = liveIdMemberName.Domain; } ADSessionSettings sessionSettings = ADSessionSettings.RootOrgOrSingleTenantFromAcceptedDomainAutoDetect(text); ITenantRecipientSession recipientSession = this.directorySessionFactoryInstance.CreateTenantRecipientSession(true, ConsistencyMode.IgnoreInvalid, sessionSettings, 140, "FindByLiveIdMemberName", "f:\\15.00.1497\\sources\\dev\\cafe\\src\\Routing\\Providers\\ActiveDirectoryUserProvider.cs"); ADRawEntry rawEntry = ActiveDirectoryUserProvider.FindByLiveIdMemberName(liveIdMemberName, recipientSession, diagnostics); return ActiveDirectoryUserProvider.CreateUserFromAdRawEntry(rawEntry); }, "FindByLiveIdMemberName failed")); }