// Token: 0x06000033 RID: 51 RVA: 0x000034F8 File Offset: 0x000016F8 internal static Uri GetRedirectUrlForTenantSite(string organization, string redirectTemplate, Uri originalUrl, ExEventLog eventLogger) { if (organization == null) { return(null); } ADSessionSettings sessionSettings; try { Guid externalDirectoryOrganizationId; sessionSettings = (Guid.TryParse(organization, out externalDirectoryOrganizationId) ? ADSessionSettings.FromExternalDirectoryOrganizationId(externalDirectoryOrganizationId) : ADSessionSettings.FromTenantCUName(organization)); } catch (CannotResolveTenantNameException) { return(null); } catch (CannotResolveExternalDirectoryOrganizationIdException) { return(null); } ITenantConfigurationSession session = DirectorySessionFactory.Default.CreateTenantConfigurationSession(ConsistencyMode.PartiallyConsistent, sessionSettings, 180, "GetRedirectUrlForTenantSite", "f:\\15.00.1497\\sources\\dev\\Configuration\\src\\RedirectionModule\\RedirectionHelper.cs"); ExchangeConfigurationUnit exchangeConfigurationUnit = RedirectionHelper.ResolveConfigurationUnitByName(organization, session); if (exchangeConfigurationUnit == null || exchangeConfigurationUnit.ManagementSiteLink == null) { return(null); } ADSite localSite = LocalSiteCache.LocalSite; ADObjectId adobjectId = ADObjectIdResolutionHelper.ResolveDN(exchangeConfigurationUnit.ManagementSiteLink); Logger.LogEvent(eventLogger, TaskEventLogConstants.Tuple_LiveIdRedirection_UsingManagementSiteLink, organization, new object[] { organization, exchangeConfigurationUnit.AdminDisplayVersion, exchangeConfigurationUnit.ManagementSiteLink }); if (adobjectId.Equals(localSite.Id)) { return(null); } foreach (ADObjectId adobjectId2 in localSite.ResponsibleForSites) { if (adobjectId2.Equals(adobjectId)) { Logger.LogEvent(eventLogger, TaskEventLogConstants.Tuple_LiveIdRedirection_TargetSitePresentOnResponsibleForSite, organization, new object[] { organization, adobjectId, adobjectId2 }); return(null); } } return(RedirectionHelper.GetRedirectUrlForTenantSite(adobjectId, redirectTemplate, originalUrl)); }
// Token: 0x0600003C RID: 60 RVA: 0x00003964 File Offset: 0x00001B64 internal static ExchangeConfigurationUnit ResolveConfigurationUnitByName(string domainName) { ITenantConfigurationSession session = DirectorySessionFactory.Default.CreateTenantConfigurationSession(ConsistencyMode.IgnoreInvalid, ADSessionSettings.FromTenantAcceptedDomain(domainName), 454, "ResolveConfigurationUnitByName", "f:\\15.00.1497\\sources\\dev\\Configuration\\src\\RedirectionModule\\RedirectionHelper.cs"); return(RedirectionHelper.ResolveConfigurationUnitByName(domainName, session)); }