private static void GetLogonUserInfo(SecurityIdentifier sid, string smtpDomain, out string smtpAddress, out string displayName, out string puid) { string smtpAddressTemporary = sid.ToString(); string displayNameTemporary = sid.ToString(); string puidTemporary = string.Empty; ADNotificationAdapter.RunADOperation(delegate() { IRecipientSession tenantOrRootOrgRecipientSession = DirectorySessionFactory.Default.GetTenantOrRootOrgRecipientSession(true, ConsistencyMode.IgnoreInvalid, ADSessionSettings.RootOrgOrSingleTenantFromAcceptedDomainAutoDetect(smtpDomain), 339, "GetLogonUserInfo", "f:\\15.00.1497\\sources\\dev\\clients\\src\\Owa2\\Server\\Core\\attachment\\CachedAttachmentInfo.cs"); PropertyDefinition[] properties = new PropertyDefinition[] { ADRecipientSchema.PrimarySmtpAddress, ADRecipientSchema.LegacyExchangeDN, ADRecipientSchema.DisplayName, ADUserSchema.NetID }; ADRawEntry entry = tenantOrRootOrgRecipientSession.FindADRawEntryBySid(sid, properties); try { CachedAttachmentInfo.SafeGetValue(entry, ADRecipientSchema.PrimarySmtpAddress, ref smtpAddressTemporary); CachedAttachmentInfo.SafeGetValue(entry, ADRecipientSchema.DisplayName, ref displayNameTemporary); CachedAttachmentInfo.SafeGetValue(entry, ADUserSchema.NetID, ref puidTemporary); } catch (NotInBagPropertyErrorException) { } }); smtpAddress = smtpAddressTemporary; displayName = displayNameTemporary; puid = puidTemporary; }
// Token: 0x06000167 RID: 359 RVA: 0x00007754 File Offset: 0x00005954 protected override ADRawEntry LoadADRawEntry() { IRecipientSession session = null; if (this.OrganizationId != null) { session = DirectoryHelper.GetRecipientSessionFromOrganizationId(base.RequestContext.LatencyTracker, this.OrganizationId, base.RequestContext.Logger); } else if (this.PartitionId != null) { session = DirectoryHelper.GetRecipientSessionFromPartition(base.RequestContext.LatencyTracker, this.PartitionId, base.RequestContext.Logger); } else if (this.SmtpOrLiveId != null) { session = DirectoryHelper.GetRecipientSessionFromSmtpOrLiveId(this.SmtpOrLiveId, base.RequestContext.Logger, base.RequestContext.LatencyTracker, false); } else { session = DirectoryHelper.GetRootOrgRecipientSession(); } ADRawEntry ret = DirectoryHelper.InvokeAccountForest <ADRawEntry>(base.RequestContext.LatencyTracker, () => session.FindADRawEntryBySid(this.Sid, this.PropertySet, "d:\\dbs\\sh\\e16df\\0212_214120_0\\cmd\\1g\\sources\\Dev\\Cafe\\src\\HttpProxy\\AnchorMailbox\\SidAnchorMailbox.cs", 151, "LoadADRawEntry"), base.RequestContext.Logger, session); return(base.CheckForNullAndThrowIfApplicable <ADRawEntry>(ret)); }
protected override ADRawEntry LoadADRawEntry() { IRecipientSession session = null; if (this.OrganizationId != null) { session = DirectoryHelper.GetRecipientSessionFromOrganizationId(base.RequestContext.LatencyTracker, this.OrganizationId); } else if (this.PartitionId != null) { session = DirectoryHelper.GetRecipientSessionFromPartition(base.RequestContext.LatencyTracker, this.PartitionId); } else if (this.SmtpOrLiveId != null) { session = DirectoryHelper.GetRecipientSessionFromSmtpOrLiveId(base.RequestContext.LatencyTracker, this.SmtpOrLiveId, false); } else { session = DirectoryHelper.GetRootOrgRecipientSession(); } ADRawEntry ret = DirectoryHelper.InvokeAccountForest(base.RequestContext.LatencyTracker, () => session.FindADRawEntryBySid(this.Sid, this.PropertySet)); return(base.CheckForNullAndThrowIfApplicable <ADRawEntry>(ret)); }