// Token: 0x0600031E RID: 798 RVA: 0x00010DF0 File Offset: 0x0000EFF0
        public static Guid GetExternalDirectoryOrganizationIdByTenantName(string tenantName, PartitionId partitionId)
        {
            if (string.IsNullOrEmpty(tenantName))
            {
                throw new ArgumentNullException("tenantName");
            }
            if (partitionId == null)
            {
                throw new ArgumentNullException("partitionId");
            }
            ADAccountPartitionLocator.LoadPartitionCacheIfNecessary();
            TenantPartitionCacheItem tenantPartitionCacheItem;

            if (!ADAccountPartitionLocator.tenantNamePartitionCache.TryGetValue(tenantName, out tenantPartitionCacheItem))
            {
                tenantPartitionCacheItem = ADAccountPartitionLocator.SearchForTenantInfoByOrganizationName(tenantName, partitionId);
                if (tenantPartitionCacheItem != null)
                {
                    ADAccountPartitionLocator.InsertCacheMaps(tenantPartitionCacheItem, null, null);
                }
            }
            if (tenantPartitionCacheItem != null)
            {
                ADAccountPartitionLocator.EnsureRegisteredAccountPartition(tenantPartitionCacheItem);
                return(tenantPartitionCacheItem.ExternalOrgId);
            }
            throw new CannotResolveTenantNameException(DirectoryStrings.CannotResolveTenantNameByAcceptedDomain(tenantName));
        }
        // Token: 0x06000320 RID: 800 RVA: 0x00010EF4 File Offset: 0x0000F0F4
        public static void AddTenantDataToCache(Guid externalDirectoryOrganizationId, string resourceForestFqdn, string accountForestFqdn, string domainName, string tenantContainerCN)
        {
            Guid accountPartitionGuid;

            ADAccountPartitionLocator.partitionsFQDNToGuid.TryGetValue(accountForestFqdn, out accountPartitionGuid);
            TenantPartitionCacheItem tenantPartitionCacheItem = new TenantPartitionCacheItem(accountPartitionGuid, accountForestFqdn, resourceForestFqdn, externalDirectoryOrganizationId, tenantContainerCN, false);

            ADAccountPartitionLocator.EnsureRegisteredAccountPartition(tenantPartitionCacheItem);
            ADAccountPartitionLocator.InsertCacheMaps(tenantPartitionCacheItem, domainName, null);
        }