0 votes

Hello,

is it possible to have in web interface, the number of objects found when launching a search

thx.

by (360 points)

1 Answer

0 votes
by (216k points)

Hello,

It is not possible, and for a good reason. The thing is that when launching a search, Adaxes service would need to fetch all search results to count how many results there are. This is a very resource-intensive operation that would produce a lot of network traffic and, probably, would take up quite a lot of time to complete. That is why Adaxes service fetches only as many results as it is needed.

0

it is not possible from the web interfaced to know how many users in an organizational unit or in a group ?

0

Hello,

There is no built-in functionality for this. However, as a workaround, you can create a Custom Command that would count the number of users in an Organizational Unit (or Group) and output the number of users to the Execution Log of the operation. The counting and creation of a record in the Execution Log will be performed by means of a PowerShell script via the Run a program or PowerShell script action. Then, you can launch this Custom Command from the Web Interface using a Home Page Action. The Execution Log of the operation will be displayed when the Home Page Action completes.

If this solution is OK with you, we can provide you with details on how to implement it.

0

Hello

yes, is it possible to get details for this solution.

thank you

0

Hello,

To create a Custom Command that can be executed on an Organizational Unit to count the number of users in that Organizational Unit:

  1. Create a new Custom Command.

  2. On the 2nd step of the Create Custom Command wizard, select the Organizational-Unit object type.

  3. On the 3rd step, add the Run a program or PowerShell script action and paste the following script:

     $calculateDirectChildrenOnly = $False # When set to $True, calculates only the users who are direct children of the target OU
    
     $searcher = New-Object "Softerra.Adaxes.Adsi.Search.DirectorySearcher" @($NULL, $False)
     $searcher.SearchParameters.BaseObjectPath = $Context.TargetObject.ObjectInfo.Path
     [String[]]$objectTypes = "user"
     $searcher.SearchParameters.Filter = [Softerra.Adaxes.Ldap.FilterBuilder]::CreateObjectTypesFilter($objectTypes)
     $searcher.SearchParameters.PageSize = 100
     $searcher.SearchParameters.PropertiesToLoad.Add("1.1") 
     if ($calculateDirectChildrenOnly)
     {
         $searcher.SearchParameters.SearchScope = "ADS_SCOPE_ONELEVEL"
     }
     else
     {
         $searcher.SearchParameters.SearchScope = "ADS_SCOPE_SUBTREE"
     }
     $iterator = $searcher.ExecuteSearch()
     try
     {
         $result = $iterator.FetchAll().Count
     }
     finally
     {
         $iterator.Dispose()
     }
     if ($result -eq 0)
     {
         $Context.LogMessage("The OU doesn't contain any users", "Information")
     }
     else
     {
         $Context.LogMessage("The OU contains $result user(s)", "Information")
     }
    


    In the script, $calculateDirectChildrenOnly controls whether the script counts only users who are direct children of the OU or all users at any nesting level. Set this variable to $True if you want the script to count only users who are direct children of the OU.

  4. Enter a short description for the script and click OK.

  5. Finish creation of the Custom Command.

To create a Custom Command that can be executed on a Group to count the number of users in that Group:

  1. Create a new Custom Command.

  2. On the 2nd step of the Create Custom Command wizard, select the Group object type.

  3. On the 3rd step, add the Run a program or PowerShell script action and paste the following script:

     $calculateDirectMembersOnly = $False # When set to $True, calculates only the users who are direct members of the target Group
    
     $result = 0
     try
     {
         $memberGuids
         if ($calculateDirectMembersOnly)
         {
             $memberGuids = $Context.TargetObject.DirectMembers
         }
         else
         {
             $memberGuids = $Context.TargetObject.AllMembers
         }
         if ($memberGuids -ne $NULL)
         {
             $result = $memberGuids.Length
         }
     }
     catch {}
    
     if ($result -eq 0)
     {
         $Context.LogMessage("The group doesn't have any members.", "Information")
     }
     else
     {
         $Context.LogMessage("The group has $result member(s).", "Information")
     }
    

    In the script, $calculateDirectMembersOnly controls whether the script counts only users who are direct members of the Group or all users at any nesting level. Set this variable to $True if you want the script to count only users who are direct members of the Group.

  4. Enter a short description for the script and click OK.

  5. Finish creation of the Custom Command.

To make the Custom Commands available on Adaxes Web Interface, you need to create Home Page Actions that will launch them from the Web Interface. See the Configure Home Page Actions Tutorial on how to do this (section Custom Command).

Related questions

0 votes
1 answer

Is it possible to change the "StartsWith" search on Quick Search to a "Contains"? I know this is possible on the Search tab, but just wondering if it can be setup for the Quick Search too

asked Apr 11, 2014 by sdavidson (730 points)
0 votes
1 answer

We have some accounts that we would like to prevent from changing their password on login when it is expired. This is because we have saml setup on individual interface pages ... of a loophole for us as we require dual factor and use saml to accomplish this.

asked Oct 26, 2021 by mark.it.admin (2.3k points)
0 votes
0 answers

Hi, I've got very slow perf on web AdaxesADmin interface. I've done search in this forum, ad firewall rule to open 389,636,3268,88,135,49152-65535 ports on my ... .Stop() give me : 'serveur RPC pas disponible. HRESULT 0x8007068A' Resolving AdsPAth: 5596 ms

asked Nov 8, 2018 by Nicolas.lussier (190 points)
0 votes
1 answer

Hi, I copied report "recently created users" and added a parameter to check for specific value in extensionAttribute3. If this attributes starts with e.g. value "startdate" , only those users ... $null, * , %%, ? , ...) Any idea how to build the report?

asked Jul 7, 2023 by wintec01 (1.5k points)
0 votes
1 answer

Hi, I'm very new to Adaxes and still getting to grips with it. Is there any way to search or filter within the web interface, users that have an Exchange Online shared mailbox? Thanks

asked Oct 14, 2020 by sysg89 (20 points)
3,588 questions
3,277 answers
8,303 comments
548,083 users