// Token: 0x06000A74 RID: 2676 RVA: 0x00028DA0 File Offset: 0x00026FA0 internal static bool VerifyDeploymentId(string deploymentId, string domain) { if (!string.IsNullOrWhiteSpace(deploymentId)) { try { ADSessionSettings adsessionSettings = ExtensionDataHelper.CreateRootOrgOrSingleTenantFromAcceptedDomainAutoDetect(domain); if (adsessionSettings != null) { IConfigurationSession tenantOrTopologyConfigurationSession = DirectorySessionFactory.Default.GetTenantOrTopologyConfigurationSession(ConsistencyMode.IgnoreInvalid, adsessionSettings, 142, "VerifyDeploymentId", "f:\\15.00.1497\\sources\\dev\\data\\src\\ApplicationLogic\\extension\\ExtensionDataHelper.cs"); AcceptedDomain acceptedDomainByDomainName = tenantOrTopologyConfigurationSession.GetAcceptedDomainByDomainName(deploymentId); if (acceptedDomainByDomainName != null) { return(true); } } } catch (ADTransientException ex) { ExtensionDataHelper.Tracer.TraceError <string>(0L, "Failed to get accepted domain by deployment id. Exception: {0}", ex.Message); } return(false); } return(false); }
// Token: 0x06000A73 RID: 2675 RVA: 0x00028CB4 File Offset: 0x00026EB4 public static string GetDeploymentId(string domain) { string text = string.Empty; try { ADSessionSettings adsessionSettings = ExtensionDataHelper.CreateRootOrgOrSingleTenantFromAcceptedDomainAutoDetect(domain); if (adsessionSettings != null) { IConfigurationSession tenantOrTopologyConfigurationSession = DirectorySessionFactory.Default.GetTenantOrTopologyConfigurationSession(ConsistencyMode.IgnoreInvalid, adsessionSettings, 80, "GetDeploymentId", "f:\\15.00.1497\\sources\\dev\\data\\src\\ApplicationLogic\\extension\\ExtensionDataHelper.cs"); AcceptedDomain defaultAcceptedDomain = tenantOrTopologyConfigurationSession.GetDefaultAcceptedDomain(); if (defaultAcceptedDomain != null && defaultAcceptedDomain.DomainName != null && defaultAcceptedDomain.DomainName.Domain != null) { text = defaultAcceptedDomain.DomainName.Domain; } else { ExtensionDataHelper.Tracer.TraceError(0L, "Failed to get a valid default accepted domain for deployment id."); } } } catch (ADTransientException ex) { ExtensionDataHelper.Tracer.TraceError <string>(0L, "Failed to get default accepted domain for deployment id. Exception: {0}", ex.Message); } if (string.IsNullOrWhiteSpace(text)) { ExtensionDataHelper.Tracer.TraceInformation <string>(0, 0L, "Can not get default authorative accepted domain, fall back to primary smtp domain: {0}.", domain); ExtensionDiagnostics.Logger.LogEvent(ApplicationLogicEventLogConstants.Tuple_FailedToGetDeploymentId, null, new object[] { "ProcessEntitlementToken", domain }); text = domain; } return(text); }