Exemplo n.º 1
0
 internal static void WarnForNoDistribution(OfflineAddressBook dataObject, Task.TaskWarningLoggingDelegate warningHandler)
 {
     if (!dataObject.PublicFolderDistributionEnabled && !dataObject.WebDistributionEnabled)
     {
         warningHandler(Strings.WarningOABWithoutDistribution);
     }
 }
Exemplo n.º 2
0
        private static void SetAces(Task.TaskVerboseLoggingDelegate verboseLogger, Task.TaskWarningLoggingDelegate warningLogger, Task.ErrorLoggerDelegate errorLogger, ADObject obj, bool remove, params ActiveDirectoryAccessRule[] aces)
        {
            if (obj == null)
            {
                throw new ArgumentNullException("obj");
            }
            RawSecurityDescriptor rawSecurityDescriptor = obj.ReadSecurityDescriptor();

            rawSecurityDescriptor = DirectoryCommon.ApplyAcesOnSd(verboseLogger, warningLogger, errorLogger, obj.Id, rawSecurityDescriptor, remove, aces);
            if (rawSecurityDescriptor != null)
            {
                obj.SaveSecurityDescriptor(rawSecurityDescriptor);
            }
        }
Exemplo n.º 3
0
 // Token: 0x060006F1 RID: 1777 RVA: 0x00019D14 File Offset: 0x00017F14
 internal static string GetLocalServerFqdn(Task.TaskWarningLoggingDelegate writeWarning)
 {
     if (string.IsNullOrEmpty(TaskHelper.localServerFqdn))
     {
         try
         {
             TaskHelper.localServerFqdn = NativeHelpers.GetLocalComputerFqdn(true);
         }
         catch (CannotGetComputerNameException ex)
         {
             if (writeWarning != null)
             {
                 writeWarning(Strings.WarningCannotGetLocalServerFqdn(ex.Message));
             }
         }
     }
     return(TaskHelper.localServerFqdn);
 }
Exemplo n.º 4
0
        private static void SetAces(Task.TaskVerboseLoggingDelegate verboseLogger, Task.TaskWarningLoggingDelegate warningLogger, Task.ErrorLoggerDelegate errorLogger, IDirectorySession session, ADObjectId id, bool remove, params ActiveDirectoryAccessRule[] aces)
        {
            if (verboseLogger != null)
            {
                verboseLogger(Strings.InfoSetAces(id.DistinguishedName));
            }
            if (session == null)
            {
                throw new ArgumentNullException("session");
            }
            if (id == null)
            {
                throw new ArgumentNullException("id");
            }
            RawSecurityDescriptor rawSecurityDescriptor = session.ReadSecurityDescriptor(id);

            rawSecurityDescriptor = DirectoryCommon.ApplyAcesOnSd(verboseLogger, warningLogger, errorLogger, id, rawSecurityDescriptor, remove, aces);
            if (rawSecurityDescriptor != null)
            {
                session.SaveSecurityDescriptor(id, rawSecurityDescriptor);
            }
        }
Exemplo n.º 5
0
 public UndeliverableItems(string undeliverableFolderPath, string replayFolderPath, Task.TaskWarningLoggingDelegate warningWriter, Task.TaskErrorLoggingDelegate errorWriter)
 {
     this.undeliverableFolderPath = undeliverableFolderPath;
     this.replayFolderPath        = replayFolderPath;
     this.warningWriter           = warningWriter;
     this.errorWriter             = errorWriter;
 }
Exemplo n.º 6
0
        internal static void PushCertificate(Server sourceServer, Task.TaskProgressLoggingDelegate writeProgress, Task.TaskWarningLoggingDelegate writeWarning, string thumbprint)
        {
            ITopologyConfigurationSession session = DirectorySessionFactory.Default.CreateTopologyConfigurationSession(ConsistencyMode.PartiallyConsistent, ADSessionSettings.FromRootOrgScopeSet(), 354, "PushCertificate", "f:\\15.00.1497\\sources\\dev\\Management\\src\\Management\\FederationProvisioning\\FederationCertificate.cs");

            FederationCertificate.PushCertificate(session, sourceServer, writeProgress, writeWarning, thumbprint);
        }
Exemplo n.º 7
0
        private static void PushCertificate(ITopologyConfigurationSession session, Server sourceServer, Task.TaskProgressLoggingDelegate writeProgress, Task.TaskWarningLoggingDelegate writeWarning, string thumbprint)
        {
            SecureString securePassword = FederationCertificate.GeneratePassword();

            FederationCertificate.EnableCertificateForNetworkService(sourceServer.Name, thumbprint);
            string base64cert = null;

            try
            {
                base64cert = FederationCertificate.ExportCertificate(sourceServer.Name, securePassword, thumbprint);
            }
            catch (InvalidOperationException)
            {
                writeWarning(Strings.WarningPushFailed(thumbprint));
                return;
            }
            catch (LocalizedException)
            {
                writeWarning(Strings.WarningPushFailed(thumbprint));
                return;
            }
            Dictionary <TopologySite, List <TopologyServer> > dictionary = null;
            TopologySite topologySite = null;

            FederationCertificate.DiscoverServers(session, true, out dictionary, out topologySite);
            if (topologySite != null)
            {
                List <TopologyServer> list;
                if (dictionary.TryGetValue(topologySite, out list))
                {
                    int count = list.Count;
                    int num   = 0;
                    foreach (TopologyServer topologyServer in list)
                    {
                        int percent = (int)((double)(++num) / (double)count * 100.0);
                        writeProgress(Strings.ProgressActivityPushFederationCertificate(thumbprint), Strings.ProgressActivityPushFederationServer(topologyServer.Name), percent);
                        if (!topologyServer.Id.Equals(sourceServer.Id))
                        {
                            try
                            {
                                FederationTrustCertificateState federationTrustCertificateState = FederationCertificate.TestForCertificate(topologyServer.Name, thumbprint);
                                if (federationTrustCertificateState == FederationTrustCertificateState.NotInstalled)
                                {
                                    FederationCertificate.ImportCertificate(topologyServer.Name, securePassword, base64cert);
                                }
                                if (federationTrustCertificateState != FederationTrustCertificateState.ServerUnreachable)
                                {
                                    FederationCertificate.EnableCertificateForNetworkService(topologyServer.Name, thumbprint);
                                }
                            }
                            catch (InvalidOperationException)
                            {
                                writeWarning(Strings.WarningPushCertificate(thumbprint, topologyServer.Name));
                            }
                            catch (LocalizedException)
                            {
                                writeWarning(Strings.WarningPushCertificate(thumbprint, topologyServer.Name));
                            }
                        }
                    }
                }
                return;
            }
            writeWarning(Strings.WarningCannotGetLocalSite(thumbprint));
        }
        internal static StoreIntegrityCheckJob CreateStoreIntegrityCheckJob(Database database, Guid mailboxGuid, StoreIntegrityCheckRequestFlags flags, MailboxCorruptionType[] taskIds, Task.TaskErrorLoggingDelegate writeError, Task.TaskWarningLoggingDelegate writeWarning, Task.TaskVerboseLoggingDelegate writeVerbose)
        {
            List <StoreIntegrityCheckJob> result = null;

            try
            {
                StoreIntegrityCheckAdminRpc.ExecuteAdminRpc(database.Guid, delegate(ExRpcAdmin rpcAdmin, string serverFqdn)
                {
                    uint[] array = new uint[taskIds.Length];
                    for (int i = 0; i < taskIds.Length; i++)
                    {
                        array[i] = (uint)taskIds[i];
                    }
                    int num;
                    int num2;
                    rpcAdmin.GetAdminVersion(out num, out num2);
                    if (num < 7 || (num == 7 && num2 < 15))
                    {
                        string input;
                        rpcAdmin.ISIntegCheck(database.Guid, mailboxGuid, (uint)flags, array.Length, array, out input);
                        JobFlags jobFlags = JobFlags.None;
                        if ((flags & StoreIntegrityCheckRequestFlags.DetectOnly) == StoreIntegrityCheckRequestFlags.DetectOnly)
                        {
                            jobFlags |= JobFlags.DetectOnly;
                        }
                        if ((flags & (StoreIntegrityCheckRequestFlags)2147483648U) == (StoreIntegrityCheckRequestFlags)2147483648U)
                        {
                            jobFlags |= (JobFlags)2147483648U;
                        }
                        if ((flags & StoreIntegrityCheckRequestFlags.Force) == StoreIntegrityCheckRequestFlags.None)
                        {
                            jobFlags |= JobFlags.Background;
                        }
                        StoreIntegrityCheckJob item = new StoreIntegrityCheckJob(new DatabaseId(null, serverFqdn, database.Name, database.Guid), Guid.Parse(input), jobFlags, (from x in array
                                                                                                                                                                               select(MailboxCorruptionType) x).ToArray <MailboxCorruptionType>());
                        result = new List <StoreIntegrityCheckJob>();
                        result.Add(item);
                        return;
                    }
                    PropValue[][] array2 = rpcAdmin.StoreIntegrityCheckEx(database.Guid, mailboxGuid, Guid.Empty, 1U, (uint)flags, array, StoreIntegrityCheckAdminRpc.JobPropTags);
                    result = new List <StoreIntegrityCheckJob>(array2.Length);
                    foreach (PropValue[] propValues in array2)
                    {
                        StoreIntegrityCheckJob item2 = new StoreIntegrityCheckJob(new DatabaseId(null, serverFqdn, database.Name, database.Guid), propValues);
                        result.Add(item2);
                    }
                }, writeError, writeWarning, writeVerbose);
            }
            catch (MapiExceptionNetworkError innerException)
            {
                writeError(new OnlineIsIntegException(database.Identity.ToString(), Strings.ServiceUnavaiable, innerException), ErrorCategory.ResourceUnavailable, database.Identity);
            }
            catch (MapiExceptionMdbOffline innerException2)
            {
                writeError(new OnlineIsIntegException(database.Identity.ToString(), Strings.DatabaseOffline, innerException2), ErrorCategory.InvalidOperation, database.Identity);
            }
            catch (MapiExceptionISIntegMdbTaskExceeded innerException3)
            {
                writeError(new OnlineIsIntegException(database.Identity.ToString(), Strings.DatabaseWideTasksExceeded, innerException3), ErrorCategory.InvalidOperation, database.Identity);
            }
            catch (MapiExceptionISIntegQueueFull innerException4)
            {
                writeError(new OnlineIsIntegException(database.Identity.ToString(), Strings.IsIntegQueueFull, innerException4), ErrorCategory.InvalidOperation, database.Identity);
            }
            catch (MapiExceptionUnknownUser)
            {
                writeWarning(Strings.WarningMailboxNeverBeenLoggedOn(mailboxGuid.ToString(), database.Identity.ToString()));
            }
            catch (MapiPermanentException ex)
            {
                writeError(new OnlineIsIntegException(database.Identity.ToString(), Strings.UnexpectedError(ex.ToString()), ex), ErrorCategory.InvalidOperation, database.Identity);
            }
            catch (MapiRetryableException ex2)
            {
                writeError(new OnlineIsIntegException(database.Identity.ToString(), Strings.UnexpectedError(ex2.ToString()), ex2), ErrorCategory.InvalidOperation, database.Identity);
            }
            return(StoreIntegrityCheckJob.Aggregate(result));
        }
Exemplo n.º 9
0
        internal static void PushCertificate(Task.TaskProgressLoggingDelegate writeProgress, Task.TaskWarningLoggingDelegate writeWarning, string thumbprint)
        {
            ITopologyConfigurationSession topologyConfigurationSession = DirectorySessionFactory.Default.CreateTopologyConfigurationSession(ConsistencyMode.PartiallyConsistent, ADSessionSettings.FromRootOrgScopeSet(), 324, "PushCertificate", "f:\\15.00.1497\\sources\\dev\\Management\\src\\Management\\FederationProvisioning\\FederationCertificate.cs");
            Server sourceServer = null;

            try
            {
                sourceServer = topologyConfigurationSession.FindLocalServer();
            }
            catch (LocalServerNotFoundException)
            {
                writeWarning(Strings.WarningPushFailed(thumbprint));
                return;
            }
            FederationCertificate.PushCertificate(topologyConfigurationSession, sourceServer, writeProgress, writeWarning, thumbprint);
        }
Exemplo n.º 10
0
        internal static void CheckManagedGroups(ADUser user, IConfigDataProvider session, Task.TaskWarningLoggingDelegate writeWarning)
        {
            QueryFilter filter = new AndFilter(new QueryFilter[]
            {
                new ComparisonFilter(ComparisonOperator.Equal, ADGroupSchema.MemberJoinRestriction, MemberUpdateType.ApprovalRequired),
                new ComparisonFilter(ComparisonOperator.Equal, ADGroupSchema.ManagedBy, user.Id)
            });
            IEnumerable <ADGroup> enumerable = session.FindPaged <ADGroup>(filter, null, true, null, 1);

            using (IEnumerator <ADGroup> enumerator = enumerable.GetEnumerator())
            {
                if (enumerator.MoveNext())
                {
                    writeWarning(Strings.WarningRemoveApprovalRequiredGroupOwners(user.Id.ToString()));
                }
            }
        }
        internal static List <StoreIntegrityCheckJob> GetStoreIntegrityCheckJob(Database database, Guid mailboxGuid, Guid requestGuid, IntegrityCheckQueryFlags flags, bool details, Task.TaskErrorLoggingDelegate writeError, Task.TaskWarningLoggingDelegate writeWarning, Task.TaskVerboseLoggingDelegate writeVerbose)
        {
            List <StoreIntegrityCheckJob> jobs = new List <StoreIntegrityCheckJob>();

            try
            {
                StoreIntegrityCheckAdminRpc.ExecuteAdminRpc(database.Guid, delegate(ExRpcAdmin rpcAdmin, string serverFqdn)
                {
                    int num;
                    int num2;
                    rpcAdmin.GetAdminVersion(out num, out num2);
                    if (num < 7 || (num == 7 && num2 < 15))
                    {
                        throw new NotSupportedException();
                    }
                    PropValue[][] array = rpcAdmin.StoreIntegrityCheckEx(database.Guid, mailboxGuid, requestGuid, 2U, (uint)flags, null, StoreIntegrityCheckAdminRpc.JobPropTags);
                    foreach (PropValue[] propValues in array)
                    {
                        jobs.Add(new StoreIntegrityCheckJob(new DatabaseId(null, serverFqdn, database.Name, database.Guid), propValues));
                    }
                }, writeError, writeWarning, writeVerbose);
            }
            catch (MapiExceptionNetworkError innerException)
            {
                writeError(new OnlineIsIntegQueryJobException(database.Identity.ToString(), Strings.ServiceUnavaiable, innerException), ErrorCategory.ResourceUnavailable, database.Identity);
            }
            catch (MapiExceptionMdbOffline innerException2)
            {
                writeError(new OnlineIsIntegQueryJobException(database.Identity.ToString(), Strings.DatabaseOffline, innerException2), ErrorCategory.InvalidOperation, database.Identity);
            }
            catch (MapiPermanentException ex)
            {
                writeError(new OnlineIsIntegQueryJobException(database.Identity.ToString(), Strings.UnexpectedError(ex.ToString()), ex), ErrorCategory.InvalidOperation, database.Identity);
            }
            catch (MapiRetryableException ex2)
            {
                writeError(new OnlineIsIntegQueryJobException(database.Identity.ToString(), Strings.UnexpectedError(ex2.ToString()), ex2), ErrorCategory.InvalidOperation, database.Identity);
            }
            if (details)
            {
                return(jobs);
            }
            return(new List <StoreIntegrityCheckJob>
            {
                StoreIntegrityCheckJob.Aggregate(jobs)
            });
        }
Exemplo n.º 12
0
        internal static ADObjectId ValidateGeneratingMailbox(IConfigDataProvider session, MailboxIdParameter generatingMailboxId, OfflineAddressBookTaskUtility.GetUniqueObject getAdUser, OfflineAddressBook target, Task.TaskWarningLoggingDelegate writeWarning, Task.TaskErrorLoggingDelegate writeError)
        {
            ADObjectId result = null;

            if (OABVariantConfigurationSettings.IsLinkedOABGenMailboxesEnabled)
            {
                if (generatingMailboxId == null)
                {
                    writeWarning(Strings.WarningGeneratingMailboxIsNullOABWillNotBeGenerated);
                }
                else
                {
                    ADUser aduser = (ADUser)getAdUser(generatingMailboxId, session, null, new LocalizedString?(Strings.ErrorMailboxAddressNotFound(generatingMailboxId.ToString())), new LocalizedString?(Strings.ErrorMailboxAddressNotUnique(generatingMailboxId.ToString())));
                    if (aduser.RecipientTypeDetails != RecipientTypeDetails.ArbitrationMailbox || aduser.PersistedCapabilities == null || !aduser.PersistedCapabilities.Contains(Capability.OrganizationCapabilityOABGen))
                    {
                        writeError(new InvalidOperationException(Strings.ErrorGeneratingMailboxInvalid(aduser.Name)), ErrorCategory.InvalidOperation, target.Identity);
                    }
                    result = aduser.Id;
                }
            }
            else if (generatingMailboxId != null)
            {
                writeError(new InvalidOperationException(Strings.ErrorLinkedMailboxesAreNotSupported), ErrorCategory.InvalidOperation, target.Identity);
            }
            return(result);
        }
Exemplo n.º 13
0
        internal static ADSystemMailbox SaveSystemMailbox(MailboxDatabase mdb, Server owningServer, ADObjectId rootOrgContainerId, ITopologyConfigurationSession configSession, IRecipientSession recipientSession, ADObjectId[] forcedReplicationSites, Task.TaskWarningLoggingDelegate writeWarning, Task.TaskVerboseLoggingDelegate writeVerbose)
        {
            TaskLogger.LogEnter();
            bool               useConfigNC        = configSession.UseConfigNC;
            bool               useGlobalCatalog   = configSession.UseGlobalCatalog;
            string             text               = "SystemMailbox" + mdb.Guid.ToString("B");
            SecurityIdentifier securityIdentifier = new SecurityIdentifier("SY");
            ADSystemMailbox    adsystemMailbox    = new ADSystemMailbox();

            adsystemMailbox.StampPersistableDefaultValues();
            adsystemMailbox.Name        = text;
            adsystemMailbox.DisplayName = text;
            adsystemMailbox.Alias       = text;
            adsystemMailbox.HiddenFromAddressListsEnabled = true;
            adsystemMailbox.Database = mdb.Id;
            if (owningServer == null)
            {
                throw new InvalidOperationException(Strings.ErrorDBOwningServerNotFound(mdb.Identity.ToString()));
            }
            adsystemMailbox.ServerLegacyDN = owningServer.ExchangeLegacyDN;
            adsystemMailbox.ExchangeGuid   = Guid.NewGuid();
            AcceptedDomain defaultAcceptedDomain = configSession.GetDefaultAcceptedDomain();

            if (defaultAcceptedDomain == null || defaultAcceptedDomain.DomainName == null || defaultAcceptedDomain.DomainName.Domain == null)
            {
                throw new ManagementObjectNotFoundException(Strings.ErrorNoDefaultAcceptedDomainFound(mdb.Identity.ToString()));
            }
            adsystemMailbox.EmailAddresses.Add(ProxyAddress.Parse("SMTP:" + adsystemMailbox.Alias + "@" + defaultAcceptedDomain.DomainName.Domain.ToString()));
            adsystemMailbox.WindowsEmailAddress         = adsystemMailbox.PrimarySmtpAddress;
            adsystemMailbox.SendModerationNotifications = TransportModerationNotificationFlags.Never;
            Organization organization = configSession.Read <Organization>(rootOrgContainerId);

            if (organization == null)
            {
                throw new ManagementObjectNotFoundException(Strings.ErrorOrganizationNotFound(rootOrgContainerId.Name));
            }
            string parentLegacyDN = string.Format(CultureInfo.InvariantCulture, "{0}/ou={1}/cn=Recipients", new object[]
            {
                organization.LegacyExchangeDN,
                configSession.GetAdministrativeGroupId().Name
            });

            adsystemMailbox.LegacyExchangeDN = LegacyDN.GenerateLegacyDN(parentLegacyDN, adsystemMailbox);
            ADComputer adcomputer;

            try
            {
                configSession.UseConfigNC      = false;
                configSession.UseGlobalCatalog = true;
                adcomputer = configSession.FindComputerByHostName(owningServer.Name);
            }
            finally
            {
                configSession.UseConfigNC      = useConfigNC;
                configSession.UseGlobalCatalog = useGlobalCatalog;
            }
            if (adcomputer == null)
            {
                throw new ManagementObjectNotFoundException(Strings.ErrorDBOwningServerNotFound(mdb.Identity.ToString()));
            }
            ADObjectId adobjectId = adcomputer.Id.DomainId;

            adobjectId = adobjectId.GetChildId("Microsoft Exchange System Objects");
            adsystemMailbox.SetId(adobjectId.GetChildId(text));
            GenericAce[] aces = new GenericAce[]
            {
                new CommonAce(AceFlags.None, AceQualifier.AccessAllowed, 131075, securityIdentifier, false, null)
            };
            DirectoryCommon.SetAclOnAlternateProperty(adsystemMailbox, aces, ADSystemAttendantMailboxSchema.ExchangeSecurityDescriptor, securityIdentifier, securityIdentifier);
            recipientSession.LinkResolutionServer = mdb.OriginatingServer;
            bool enforceDefaultScope = recipientSession.EnforceDefaultScope;

            try
            {
                writeVerbose(TaskVerboseStringHelper.GetSaveObjectVerboseString(adsystemMailbox, recipientSession, typeof(ADSystemMailbox)));
                recipientSession.EnforceDefaultScope = false;
                recipientSession.Save(adsystemMailbox);
            }
            catch (ADConstraintViolationException ex)
            {
                IConfigurationSession tenantOrTopologyConfigurationSession = DirectorySessionFactory.Default.GetTenantOrTopologyConfigurationSession(ex.Server, false, ConsistencyMode.PartiallyConsistent, configSession.SessionSettings, 705, "SaveSystemMailbox", "f:\\15.00.1497\\sources\\dev\\Management\\src\\Management\\SystemConfigurationTasks\\database\\NewMailboxDatabase.cs");
                if (!tenantOrTopologyConfigurationSession.ReplicateSingleObjectToTargetDC(mdb, ex.Server))
                {
                    throw;
                }
                writeVerbose(TaskVerboseStringHelper.GetSaveObjectVerboseString(adsystemMailbox, recipientSession, typeof(ADSystemMailbox)));
                recipientSession.Save(adsystemMailbox);
            }
            finally
            {
                writeVerbose(TaskVerboseStringHelper.GetSourceVerboseString(recipientSession));
                recipientSession.EnforceDefaultScope = enforceDefaultScope;
            }
            if (forcedReplicationSites != null)
            {
                DagTaskHelper.ForceReplication(recipientSession, adsystemMailbox, forcedReplicationSites, mdb.Name, writeWarning, writeVerbose);
            }
            TaskLogger.LogExit();
            return(adsystemMailbox);
        }
Exemplo n.º 14
0
 public static void WriteReportEntries(string request, List <ReportEntry> entries, object target, Task.TaskVerboseLoggingDelegate writeVerbose, Task.TaskWarningLoggingDelegate writeWarning, Task.TaskErrorLoggingDelegate writeError)
 {
     if (entries != null)
     {
         foreach (ReportEntry reportEntry in entries)
         {
             if (reportEntry.Type == ReportEntryType.Error)
             {
                 writeError(new InvalidRequestPermanentException(request, reportEntry.Message), ErrorCategory.InvalidOperation, target);
             }
             else if (reportEntry.Type == ReportEntryType.Warning || reportEntry.Type == ReportEntryType.WarningCondition)
             {
                 writeWarning(reportEntry.Message);
             }
             else
             {
                 writeVerbose(reportEntry.Message);
             }
         }
     }
 }
Exemplo n.º 15
0
        public CmdletProxyDataReader(RunspaceMediator runspaceMediator, PSCommand cmd, Task.TaskWarningLoggingDelegate writeWarning)
        {
            this.runspaceProxy = new RunspaceProxy(runspaceMediator, true);
            bool flag = false;

            try
            {
                this.shellProxy   = new PowerShellProxy(this.runspaceProxy, cmd);
                this.writeWarning = writeWarning;
                this.asyncResult  = (PowerShellAsyncResult <PSObject>) this.shellProxy.BeginInvoke(null, null);
                PSDataCollection <PSObject> output = this.asyncResult.Output;
                this.shellProxy.PowerShell.InvocationStateChanged += this.PipelineStateChanged;
                output.DataAdded += this.PipelineDataAdded;
                flag              = true;
            }
            finally
            {
                if (!flag)
                {
                    this.Close();
                }
            }
        }
Exemplo n.º 16
0
        public static void ValidateItemLimits(Unlimited <int> badItemLimit, Unlimited <int> largeItemLimit, SwitchParameter acceptLargeDataLoss, Task.TaskErrorLoggingDelegate writeError, Task.TaskWarningLoggingDelegate writeWarning, string executingUserIdentity)
        {
            Unlimited <int>         value = new Unlimited <int>(TestIntegration.Instance.LargeDataLossThreshold);
            PropertyValidationError propertyValidationError = RequestJobSchema.BadItemLimit.ValidateValue(badItemLimit, false);

            if (propertyValidationError != null)
            {
                writeError(new DataValidationException(propertyValidationError), ErrorCategory.InvalidArgument, badItemLimit);
            }
            propertyValidationError = RequestJobSchema.LargeItemLimit.ValidateValue(largeItemLimit, false);
            if (propertyValidationError != null)
            {
                writeError(new DataValidationException(propertyValidationError), ErrorCategory.InvalidArgument, largeItemLimit);
            }
            if (largeItemLimit > value && !acceptLargeDataLoss)
            {
                writeError(new LargeDataLossNotAcceptedPermanentException("LargeItemLimit", largeItemLimit.ToString(), "AcceptLargeDataLoss", executingUserIdentity), ErrorCategory.InvalidArgument, acceptLargeDataLoss);
            }
            if (badItemLimit == RequestTaskHelper.UnlimitedZero && largeItemLimit == RequestTaskHelper.UnlimitedZero && acceptLargeDataLoss)
            {
                writeError(new RecipientTaskException(Strings.ErrorParameterValueNotAllowed("AcceptLargeDataLoss")), ErrorCategory.InvalidArgument, acceptLargeDataLoss);
            }
            if (badItemLimit > RequestTaskHelper.UnlimitedZero)
            {
                writeWarning(Strings.WarningNonZeroItemLimitMove("BadItemLimit"));
            }
            if (largeItemLimit > RequestTaskHelper.UnlimitedZero)
            {
                writeWarning(Strings.WarningNonZeroItemLimitMove("LargeItemLimit"));
            }
        }
Exemplo n.º 17
0
        internal static void SyncGlobalAddressLists(ExchangeConfigurationContainerWithAddressLists ecc, Task.TaskWarningLoggingDelegate writeWarning)
        {
            bool flag = false;
            IEnumerable <ADObjectId> enumerable = ecc.DefaultGlobalAddressList.Except(ecc.DefaultGlobalAddressList2);

            foreach (ADObjectId item in enumerable)
            {
                if (!flag)
                {
                    writeWarning(Strings.WarningFixedMissingGALEntry);
                    flag = true;
                }
                ecc.DefaultGlobalAddressList2.Add(item);
            }
        }
 internal static void RemoveStoreIntegrityCheckJob(Database database, Guid jobGuid, Task.TaskErrorLoggingDelegate writeError, Task.TaskWarningLoggingDelegate writeWarning, Task.TaskVerboseLoggingDelegate writeVerbose)
 {
     try
     {
         StoreIntegrityCheckAdminRpc.ExecuteAdminRpc(database.Guid, delegate(ExRpcAdmin rpcAdmin, string serverFqdn)
         {
             int num;
             int num2;
             rpcAdmin.GetAdminVersion(out num, out num2);
             if (num < 7 || (num == 7 && num2 < 15))
             {
                 throw new NotSupportedException();
             }
             rpcAdmin.StoreIntegrityCheckEx(database.Guid, Guid.Empty, jobGuid, 3U, 0U, null, null);
         }, writeError, writeWarning, writeVerbose);
     }
     catch (MapiExceptionNetworkError innerException)
     {
         writeError(new OnlineIsIntegRemoveJobException(database.Identity.ToString(), jobGuid.ToString(), Strings.ServiceUnavaiable, innerException), ErrorCategory.ResourceUnavailable, database.Identity);
     }
     catch (MapiExceptionMdbOffline innerException2)
     {
         writeError(new OnlineIsIntegRemoveJobException(database.Identity.ToString(), jobGuid.ToString(), Strings.DatabaseOffline, innerException2), ErrorCategory.InvalidOperation, database.Identity);
     }
     catch (MapiPermanentException ex)
     {
         writeError(new OnlineIsIntegRemoveJobException(database.Identity.ToString(), jobGuid.ToString(), Strings.UnexpectedError(ex.ToString()), ex), ErrorCategory.InvalidOperation, database.Identity);
     }
     catch (MapiRetryableException ex2)
     {
         writeError(new OnlineIsIntegRemoveJobException(database.Identity.ToString(), jobGuid.ToString(), Strings.UnexpectedError(ex2.ToString()), ex2), ErrorCategory.InvalidOperation, database.Identity);
     }
 }
Exemplo n.º 19
0
        // Token: 0x06000452 RID: 1106 RVA: 0x0000F624 File Offset: 0x0000D824
        internal static OrganizationIdParameter ResolveTargetOrganizationIdParameter(OrganizationIdParameter organizationParameter, IIdentityParameter identity, OrganizationId currentOrganizationId, Task.ErrorLoggerDelegate errorHandler, Task.TaskWarningLoggingDelegate warningHandler)
        {
            OrganizationIdParameter organizationIdParameter = null;

            if (identity != null)
            {
                if (identity is MailPublicFolderIdParameter)
                {
                    organizationIdParameter = (identity as MailPublicFolderIdParameter).Organization;
                }
                else if (identity is PublicFolderIdParameter)
                {
                    organizationIdParameter = (identity as PublicFolderIdParameter).Organization;
                }
            }
            if (!currentOrganizationId.Equals(OrganizationId.ForestWideOrgId))
            {
                if (organizationIdParameter != null)
                {
                    errorHandler(new ManagementObjectNotFoundException(Strings.ErrorManagementObjectNotFound(identity.ToString())), ExchangeErrorCategory.Client, identity);
                }
            }
            else
            {
                if (organizationParameter != null)
                {
                    if (organizationIdParameter != null)
                    {
                        warningHandler(Strings.WarningDuplicateOrganizationSpecified(organizationParameter.ToString(), organizationIdParameter.ToString()));
                    }
                    organizationIdParameter = organizationParameter;
                }
                if (organizationIdParameter == null && !(identity is MailPublicFolderIdParameter))
                {
                    errorHandler(new ErrorMissOrganizationException(), ExchangeErrorCategory.Client, null);
                }
            }
            return(organizationIdParameter);
        }
Exemplo n.º 20
0
 public ProxyPSCommand(RemoteConnectionInfo connectionInfo, PSCommand cmd, Task.TaskWarningLoggingDelegate writeWarning) : this(connectionInfo, cmd, false, writeWarning)
 {
 }
 // Token: 0x06001B1E RID: 6942 RVA: 0x00074D68 File Offset: 0x00072F68
 public SeedProgressReporter(Guid dbGuid, string databaseName, SeederClient client, Task.TaskErrorLoggingDelegate writeError, Task.TaskWarningLoggingDelegate writeWarning, SeedProgressReporter.ProgressReportDelegate progressDelegate, SeedProgressReporter.ProgressCompletedDelegate progressCompleted, SeedProgressReporter.ProgressFailedDelegate progressFailed) : base(true)
 {
     this.m_guid              = dbGuid;
     this.m_databaseName      = databaseName;
     this.m_client            = client;
     this.m_writeError        = writeError;
     this.m_writeWarning      = writeWarning;
     this.m_progressDelegate  = progressDelegate;
     this.m_progressCompleted = progressCompleted;
     this.m_progressFailed    = progressFailed;
 }
        internal static void CheckModerationInMixedEnvironment(ADRecipient recipient, Task.TaskWarningLoggingDelegate warningLogger, LocalizedString warningText)
        {
            if (!recipient.ModerationEnabled || !recipient.IsModified(ADRecipientSchema.ModerationEnabled))
            {
                return;
            }
            ITopologyConfigurationSession topologyConfigurationSession = DirectorySessionFactory.Default.CreateTopologyConfigurationSession(false, ConsistencyMode.PartiallyConsistent, ADSessionSettings.FromRootOrgScopeSet(), 103, "CheckModerationInMixedEnvironment", "f:\\15.00.1497\\sources\\dev\\Management\\src\\Management\\RecipientTasks\\DistributionList\\DistributionGroupTaskHelper.cs");
            ADPagedReader <MiniServer>    adpagedReader = topologyConfigurationSession.FindPagedMiniServer(null, QueryScope.SubTree, DistributionGroupTaskHelper.filter, null, 1, DistributionGroupTaskHelper.ExchangeVersionProperties);

            using (IEnumerator <MiniServer> enumerator = adpagedReader.GetEnumerator())
            {
                if (enumerator.MoveNext())
                {
                    MiniServer miniServer = enumerator.Current;
                    warningLogger(warningText);
                }
            }
        }
Exemplo n.º 23
0
        internal static IEnumerable <PSObject> RPSProxyExecution(Guid cmdletUniqueId, PSCommand command, string serverFqn, ExchangeRunspaceConfiguration runspaceConfig, int serverVersion, bool asyncProxying, Task.TaskWarningLoggingDelegate writeWarning)
        {
            Uri uri = ProxyHelper.BuildCmdletProxyUri(serverFqn, runspaceConfig, serverVersion);
            IEnumerable <PSObject> result;

            try
            {
                RemoteConnectionInfo connectionInfo = ProxyHelper.BuildProxyWSManConnectionInfo(uri);
                ProxyPSCommand       proxyPSCommand = new ProxyPSCommand(connectionInfo, command, asyncProxying, writeWarning);
                result = proxyPSCommand.Invoke();
            }
            catch (Exception)
            {
                CmdletLogger.SafeAppendGenericInfo(cmdletUniqueId, "TargetUri", uri.ToString());
                throw;
            }
            return(result);
        }
        private static void ExecuteAdminRpc(Guid databaseGuid, Action <ExRpcAdmin, string> action, Task.TaskErrorLoggingDelegate writeError, Task.TaskWarningLoggingDelegate writeWarning, Task.TaskVerboseLoggingDelegate writeVerbose)
        {
            ActiveManager        activeManagerInstance = ActiveManager.GetActiveManagerInstance();
            DatabaseLocationInfo serverForDatabase     = activeManagerInstance.GetServerForDatabase(databaseGuid);
            string serverFqdn = serverForDatabase.ServerFqdn;

            using (ExRpcAdmin exRpcAdmin = ExRpcAdmin.Create("Client=Management", serverFqdn, null, null, null))
            {
                action(exRpcAdmin, serverFqdn);
            }
        }
Exemplo n.º 25
0
        // Token: 0x06001644 RID: 5700 RVA: 0x00053BE8 File Offset: 0x00051DE8
        private void ProxyCmdletExecution(CmdletProxyInfo cmdletProxyInfo)
        {
            ExAssert.RetailAssert(this.context.ExchangeRunspaceConfig != null, "this.context.ExchangeRunspaceConfig should not be null.");
            string remoteServerFqdn           = cmdletProxyInfo.RemoteServerFqdn;
            int    remoteServerVersion        = cmdletProxyInfo.RemoteServerVersion;
            string friendlyVersionInformation = ProxyHelper.GetFriendlyVersionInformation(remoteServerVersion);

            CmdletProxyInfo.ChangeCmdletProxyParametersDelegate changeCmdletProxyParameters = cmdletProxyInfo.ChangeCmdletProxyParameters;
            if (Microsoft.Exchange.Diagnostics.Components.Tasks.ExTraceGlobals.FaultInjectionTracer.IsTraceEnabled(TraceType.FaultInjection))
            {
                Microsoft.Exchange.Diagnostics.Components.Tasks.ExTraceGlobals.FaultInjectionTracer.TraceTest <string>(3720752445U, ref remoteServerFqdn);
                UserToken userToken = this.context.ExchangeRunspaceConfig.ConfigurationSettings.UserToken;
                ProxyHelper.FaultInjection_UserSid(ref userToken);
                Microsoft.Exchange.Diagnostics.Components.Tasks.ExTraceGlobals.FaultInjectionTracer.TraceTest <int>(3452316989U, ref remoteServerVersion);
            }
            string text = this.GeneratePswsProxyCmdlet(changeCmdletProxyParameters);

            ExchangeRunspaceConfigurationSettings.ProxyMethod proxyMethod = this.DetermineProxyMethod(remoteServerVersion);
            if (this.context.CommandShell != null)
            {
                this.context.CommandShell.WriteVerbose(Strings.VerboseCmdletProxiedToAnotherServer(text, remoteServerFqdn, friendlyVersionInformation, proxyMethod.ToString()));
            }
            Guid uniqueId = this.context.UniqueId;

            CmdletLogger.SafeAppendColumn(uniqueId, RpsCmdletMetadata.CmdletProxyRemoteServer, this.proxiedObjectCount.ToString(), remoteServerFqdn);
            CmdletLogger.SafeAppendColumn(uniqueId, RpsCmdletMetadata.CmdletProxyRemoteServerVersion, this.proxiedObjectCount.ToString(), friendlyVersionInformation.ToString());
            CmdletLogger.SafeAppendColumn(uniqueId, RpsCmdletMetadata.CmdletProxyMethod, this.proxiedObjectCount.ToString(), proxyMethod.ToString());
            try
            {
                IEnumerable <PSObject> enumerable;
                if (proxyMethod == ExchangeRunspaceConfigurationSettings.ProxyMethod.RPS)
                {
                    PSCommand command = this.GenerateProxyCmdlet(changeCmdletProxyParameters);
                    Task.TaskWarningLoggingDelegate writeWarning = null;
                    if (this.context.CommandShell != null)
                    {
                        writeWarning = new Task.TaskWarningLoggingDelegate(this.context.CommandShell.WriteWarning);
                    }
                    enumerable = ProxyHelper.RPSProxyExecution(this.context.UniqueId, command, remoteServerFqdn, this.context.ExchangeRunspaceConfig, remoteServerVersion, cmdletProxyInfo.ShouldAsyncProxy, writeWarning);
                }
                else
                {
                    enumerable = CommandInvocation.Invoke(this.context.UniqueId, ProxyHelper.GetPSWSProxySiteUri(remoteServerFqdn), text, CredentialCache.DefaultNetworkCredentials, ProxyHelper.GetPSWSProxyRequestHeaders(this.context.ExchangeRunspaceConfig), this.context.ExchangeRunspaceConfig.TypeTable);
                }
                foreach (PSObject psobject in enumerable)
                {
                    object sendToPipeline = psobject;
                    if (psobject.BaseObject != null && !(psobject.BaseObject is PSCustomObject))
                    {
                        sendToPipeline = psobject.BaseObject;
                    }
                    else if (this.context.ExchangeRunspaceConfig != null)
                    {
                        if (this.context.ExchangeRunspaceConfig.ConfigurationSettings.ClientApplication != ExchangeRunspaceConfigurationSettings.ExchangeApplication.ECP)
                        {
                            if (this.context.ExchangeRunspaceConfig.ConfigurationSettings.ClientApplication != ExchangeRunspaceConfigurationSettings.ExchangeApplication.OSP)
                            {
                                goto IL_2CB;
                            }
                        }
                        try
                        {
                            Task.TaskVerboseLoggingDelegate writeVerbose = null;
                            if (this.context.CommandShell != null)
                            {
                                writeVerbose = new Task.TaskVerboseLoggingDelegate(this.context.CommandShell.WriteWarning);
                            }
                            sendToPipeline = ProxyHelper.ConvertPSObjectToOriginalType(psobject, remoteServerVersion, writeVerbose);
                        }
                        catch (Exception ex)
                        {
                            CmdletLogger.SafeAppendGenericError(uniqueId, "ConvertPSObjectToOriginalTyp", ex, new Func <Exception, bool>(TaskHelper.IsTaskUnhandledException));
                            Diagnostics.ReportException(ex, Constants.CoreEventLogger, TaskEventLogConstants.Tuple_UnhandledException, null, null, Microsoft.Exchange.Diagnostics.Components.Configuration.Core.ExTraceGlobals.InstrumentationTracer, "Exception from ProxyHelper.ConvertPSObjectToOriginalType : {0}");
                        }
                    }
IL_2CB:
                    if (this.context.CommandShell != null)
                    {
                        this.context.CommandShell.WriteObject(sendToPipeline);
                    }
                }
            }
            catch (Exception ex2)
            {
                CmdletLogger.SafeAppendGenericError(this.context.UniqueId, "ProxyCmdletExecution", ex2, new Func <Exception, bool>(TaskHelper.IsTaskUnhandledException));
                if (this.context.CommandShell != null)
                {
                    this.context.CommandShell.WriteError(new CmdletProxyException(text, remoteServerFqdn, friendlyVersionInformation, proxyMethod.ToString(), ex2.Message), ExchangeErrorCategory.ServerOperation, null);
                }
            }
        }
Exemplo n.º 26
0
        internal static void DoMaintenanceTask(PublicFolderDatabase publicStore, string domainController, Task.TaskWarningLoggingDelegate warningHandler)
        {
            Server server = publicStore.GetServer();

            if (!server.IsExchange2007OrLater)
            {
                warningHandler(Strings.WarningSiteFolderCheckTaskNotAvailableOnTiServer(server.Name));
                return;
            }
            string a = domainController;

            try
            {
                a = SystemConfigurationTasksHelper.GetConfigurationDomainControllerFqdn(domainController);
            }
            catch (SocketException ex)
            {
                warningHandler(Strings.ErrorResolveFqdnForDomainController(domainController, ex.Message));
            }
            string configDC = ADSession.GetConfigDC(TopologyProvider.LocalForestFqdn, server.Name);

            if (string.Equals(a, configDC, StringComparison.InvariantCultureIgnoreCase))
            {
                try
                {
                    using (ExRpcAdmin exRpcAdmin = ExRpcAdmin.Create("Client=Management", server.Fqdn, null, null, null))
                    {
                        exRpcAdmin.DoMaintenanceTask(publicStore.Guid, MaintenanceTask.SiteFolderCheck);
                    }
                    return;
                }
                catch (MapiPermanentException ex2)
                {
                    TaskLogger.Trace("Set/New-OfflineAddressBook.InternalProcessRecord raises exception while running site folder check task: {0}", new object[]
                    {
                        ex2.Message
                    });
                    warningHandler(Strings.ErrorFailedToRunSiteFolderCheckTask(server.Name, ex2.Message));
                    return;
                }
                catch (MapiRetryableException ex3)
                {
                    TaskLogger.Trace("Set/New-OfflineAddressBook.InternalProcessRecord raises exception while running site folder check task: {0}", new object[]
                    {
                        ex3.Message
                    });
                    warningHandler(Strings.ErrorFailedToRunSiteFolderCheckTask(server.Name, ex3.Message));
                    return;
                }
            }
            warningHandler(Strings.WarningOabSiteFolderCheckNotRun(server.Name));
        }
Exemplo n.º 27
0
        public ProxyPSCommand(RemoteConnectionInfo connectionInfo, PSCommand cmd, bool asyncInvoke, Task.TaskWarningLoggingDelegate writeWarning)
        {
            if (connectionInfo == null)
            {
                throw new ArgumentNullException("connectionInfo");
            }
            if (cmd == null)
            {
                throw new ArgumentNullException("cmd");
            }
            RemoteRunspaceFactory remoteRunspaceFactory = new RemoteRunspaceFactory(new RunspaceConfigurationFactory(), null, connectionInfo);

            this.runspaceMediator = new RunspaceMediator(remoteRunspaceFactory, new BasicRunspaceCache(1));
            this.cmd          = cmd;
            this.asyncInvoke  = asyncInvoke;
            this.writeWarning = writeWarning;
        }
Exemplo n.º 28
0
 internal static void ValidatePublicFolderInfrastructure(IConfigDataProvider session, Task.TaskErrorLoggingDelegate errorHandler, Task.TaskWarningLoggingDelegate warningHandler, bool publicFolderDistributionEnabled)
 {
     IConfigurable[] array = session.Find <PublicFolderDatabase>(null, null, true, null);
     if (array.Length == 0)
     {
         if (publicFolderDistributionEnabled)
         {
             errorHandler(new InvalidOperationException(Strings.ErrorPublicFolderFree), ErrorCategory.InvalidOperation, null);
             return;
         }
         warningHandler(Strings.WarningPublicFolderFree);
     }
 }
Exemplo n.º 29
0
        public static void SetMailboxAces(ADUser mailbox, IConfigDataProvider writableAdSession, Task.TaskVerboseLoggingDelegate logVerbose, Task.TaskWarningLoggingDelegate logWarning, Task.ErrorLoggerDelegate logError, IConfigurationSession adSession, ref MapiMessageStoreSession storeSession, bool remove, params ActiveDirectoryAccessRule[] aces)
        {
            ActiveDirectorySecurity activeDirectorySecurity = PermissionTaskHelper.ReadMailboxSecurityDescriptor(mailbox, adSession, logVerbose, logError);

            if (activeDirectorySecurity != null)
            {
                DirectoryCommon.ApplyAcesOnAcl(logVerbose, logWarning, null, mailbox.DistinguishedName, activeDirectorySecurity, remove, aces);
                PermissionTaskHelper.SaveMailboxSecurityDescriptor(mailbox, activeDirectorySecurity, writableAdSession, ref storeSession, logVerbose, logError);
            }
        }
Exemplo n.º 30
0
 public static void SetResolveUsers(AdminAuditLogSearch searchObject, DataAccessHelper.GetDataObjectDelegate getDataObject, Task.TaskVerboseLoggingDelegate writeVerbose, Task.TaskWarningLoggingDelegate writeWarning)
 {
     if (searchObject.UserIdsUserInput != null && searchObject.UserIdsUserInput.Count > 0)
     {
         writeVerbose(Strings.VerboseStartResolvingUsers);
         ADObjectId        rootOrgContainerIdForLocalForest = ADSystemConfigurationSession.GetRootOrgContainerIdForLocalForest();
         ADSessionSettings sessionSettings = ADSessionSettings.FromOrganizationIdWithoutRbacScopes(rootOrgContainerIdForLocalForest, searchObject.OrganizationId, null, false);
         IRecipientSession tenantOrRootOrgRecipientSession = DirectorySessionFactory.Default.GetTenantOrRootOrgRecipientSession(true, ConsistencyMode.PartiallyConsistent, sessionSettings, 515, "SetResolveUsers", "f:\\15.00.1497\\sources\\dev\\Management\\src\\Management\\AdminAuditLog\\AdminAuditLogHelper.cs");
         tenantOrRootOrgRecipientSession.UseConfigNC = false;
         searchObject.UserIds       = new MultiValuedProperty <string>();
         searchObject.ResolvedUsers = new MultiValuedProperty <string>();
         foreach (SecurityPrincipalIdParameter securityPrincipalIdParameter in searchObject.UserIdsUserInput)
         {
             searchObject.UserIds.Add(securityPrincipalIdParameter.RawIdentity);
             bool flag = false;
             try
             {
                 ADRecipient adrecipient = (ADRecipient)getDataObject(securityPrincipalIdParameter, tenantOrRootOrgRecipientSession, null, null, new LocalizedString?(Strings.WarningSearchUserNotFound(securityPrincipalIdParameter.ToString())), new LocalizedString?(Strings.ErrorSearchUserNotUnique(securityPrincipalIdParameter.ToString())));
                 if (adrecipient.Id != null && adrecipient.Id.DomainId != null && !string.IsNullOrEmpty(adrecipient.Id.DomainId.Name))
                 {
                     string text = (string)adrecipient.propertyBag[IADSecurityPrincipalSchema.SamAccountName];
                     if (!string.IsNullOrEmpty(text))
                     {
                         searchObject.ResolvedUsers.Add(adrecipient.Id.DomainId.Name + "\\" + text);
                         flag = true;
                         writeVerbose(Strings.DebugResolvingDomainAccount(securityPrincipalIdParameter.ToString(), adrecipient.Id.DomainId.Name, text));
                     }
                 }
                 if (adrecipient.propertyBag[IADSecurityPrincipalSchema.Sid] != null)
                 {
                     string value = ((SecurityIdentifier)adrecipient.propertyBag[IADSecurityPrincipalSchema.Sid]).Value;
                     if (!string.IsNullOrEmpty(value))
                     {
                         searchObject.ResolvedUsers.Add(value);
                         flag = true;
                         writeVerbose(Strings.DebugResolvingUserSid(securityPrincipalIdParameter.ToString(), value));
                     }
                 }
                 if (adrecipient.Id != null && !string.IsNullOrEmpty(adrecipient.Id.ToString()))
                 {
                     searchObject.ResolvedUsers.Add(adrecipient.Id.ToString());
                     flag = true;
                     writeVerbose(Strings.DebugResolvingUserCN(securityPrincipalIdParameter.ToString(), adrecipient.Id.ToString()));
                 }
                 if (!flag)
                 {
                     writeWarning(Strings.WarningCannotResolveUser(securityPrincipalIdParameter.ToString()));
                     searchObject.ResolvedUsers.Add(securityPrincipalIdParameter.ToString());
                 }
             }
             catch (ManagementObjectNotFoundException)
             {
                 writeWarning(Strings.WarningSearchUserNotFound(securityPrincipalIdParameter.ToString()));
                 searchObject.ResolvedUsers.Add(securityPrincipalIdParameter.ToString());
             }
         }
     }
 }