Exemplo n.º 1
0
        public static ADUser GetOrganizationMailboxByUPNAndCapability(IRecipientSession session, string targetOrgMailbox, OrganizationCapability capability)
        {
            Util.ThrowOnNullOrEmptyArgument(targetOrgMailbox, "targetOrgMailbox");
            QueryFilter   optionalFilter = new TextFilter(ADUserSchema.UserPrincipalName, targetOrgMailbox, MatchOptions.FullString, MatchFlags.IgnoreCase);
            List <ADUser> list           = OrganizationMailbox.InternalGetOrganizationMailboxesByCapability(session, capability, optionalFilter);

            if (list.Count != 1)
            {
                ExTraceGlobals.StorageTracer.TraceError <string, OrganizationCapability, OrganizationId>(0L, "[GetOrganizationMailboxByUPNAndCapacity] Unable to find organization mailbox with UPN {0} capability {1} for organization {2}.", targetOrgMailbox, capability, session.SessionSettings.CurrentOrganizationId);
                return(null);
            }
            return(list[0]);
        }
Exemplo n.º 2
0
 public static List <ADUser> GetOrganizationMailboxesByCapability(IRecipientSession session, OrganizationCapability capability)
 {
     return(OrganizationMailbox.InternalGetOrganizationMailboxesByCapability(session, capability, null));
 }
Exemplo n.º 3
0
 public static List <ADUser> GetOrganizationMailboxesByCapability(IRecipientSession session, OrganizationCapability capability, QueryFilter optionalFilter)
 {
     return(OrganizationMailbox.InternalGetOrganizationMailboxesByCapability(session, capability, optionalFilter));
 }