0 votes

I have reviewed the the actual logs under logging and can see tasks that went off for approval, but when I select Approval Requests - I cannot find them under approved, denied, or cancelled. Where can I find out who approved these items and when? I believe it may be a limitation problem as when I select All - Approved it shows me 1000 and that never grows beyond that number.

by (360 points)

1 Answer

0 votes
by (216k points)

Hello Michael,

Currently, Adaxes shows you only 1000 latest Approval Requests. The task to show all Approval Requests is in our TODO list.

For now, you can use a PowerShell script that outputs all approved requests that were initiated during the last X days. The number of days is specified by the $daysNumber variable. Here it is:

[Reflection.Assembly]::LoadWithPartialName("Softerra.Adaxes.Adsi")

$daysNumber = 30 # TODO: modify me

$admNS = New-Object("Softerra.Adaxes.Adsi.AdmNamespace")
$admService = $admNS.GetServiceDirectly("localhost")

# Bind to the Approval Requests container
$containerPath = $admService.Backend.GetConfigurationContainerPath("ApprovalRequests")
$searcher = $admService.OpenObject($containerPath.ToString(), $NULL, $NULL, 0)

# Get approval requests
$state = 1 # Approved request
#$state = 2 # Denied request
#$state = 3 # Canceled request

$startDateTime = ((Get-Date).AddDays(-$daysNumber)).ToFileTime()

$searcher.SearchFilter = "(&(objectCategory=adm-ApprovalRequest)(adm-ApprovalState=$state)(adm-ApprovalRequestCreationTime>=$startDateTime))"
$searcher.PageSize = 500

$requests = $searcher.ExecuteSearch()

# Iterate through the requests
foreach($request in $requests.FetchAll())
{
    $request = $admService.OpenObject($request.AdsPath, $NULL, $NULL, 0)

    Write-Host "Date: " $request.CreationDate
    Write-Host "Operation:" $request.DescriptionOfOperationToApprove
    Write-Host "ProcessedBy:" $request.ProcessedBy.Get("name")
    Write-Host "Requestor:" $request.Requestor.Get("name")
    Write-Host
}

$requests.Dispose()
0

Thank you, could I get this to wrtie to a file?

0

Hello Michael,

Yes, sure. This version of the script outputs the Approval Requests information to the CSV file specified by $csvFilePath.

[Reflection.Assembly]::LoadWithPartialName("Softerra.Adaxes.Adsi")

$csvFilePath = "\\server\share\File.csv" # TODO: modify me
$daysNumber = 30 # TODO: modify me

$admNS = New-Object("Softerra.Adaxes.Adsi.AdmNamespace")
$admService = $admNS.GetServiceDirectly("localhost")

# Bind to the Approval Requests container
$containerPath = $admService.Backend.GetConfigurationContainerPath("ApprovalRequests")
$searcher = $admService.OpenObject($containerPath.ToString(), $NULL, $NULL, 0)

# Get approval requests
$state = 1 # Approved request
#$state = 2 # Denied request
#$state = 3 # Canceled request

$startDateTime = ((Get-Date).AddDays(-$daysNumber)).ToFileTime()

$searcher.SearchFilter = "(&(objectCategory=adm-ApprovalRequest)(adm-ApprovalState=$state)(adm-ApprovalRequestCreationTime>=$startDateTime))"
$searcher.PageSize = 500

$requests = $searcher.ExecuteSearch()

# Iterate through the requests
$newCSVObject = @()
foreach($request in $requests.FetchAll())
{
    $request = $admService.OpenObject($request.AdsPath, $NULL, $NULL, 0)

    $newPSObject = New-Object PSObject
    $newPSObject | Add-Member -Name Date -Value $request.CreationDate -MemberType NoteProperty
    $newPSObject | Add-Member -Name Operation -Value $request.DescriptionOfOperationToApprove -MemberType NoteProperty
    $newPSObject | Add-Member -Name ProcessedBy -Value $request.ProcessedBy.Get("name") -MemberType NoteProperty
    $newPSObject | Add-Member -Name Requestor -Value $request.Requestor.Get("name") -MemberType NoteProperty

    $newCSVObject += $newPSObject
}

$newCSVObject | Export-CSV $csvFilePath -NoType
$requests.Dispose()
0

Starting from version 2013.1, Adaxes shows all Approval Requests that match the search filter. The limitation of showing only 1000 Approval Requests has been removed.

Related questions

0 votes
1 answer

Good morning, I'm not sure how to go about this, but I want a modified version of the default Approved requests report but I want the option to select a user and then ... then have it only showing the custom commands and changes that were run on that user.

asked Jan 10 by ocanizales (60 points)
0 votes
1 answer

Hi if a request is send to the supervisor of the requester and he does not approve in 7 days can the request be forwarded to the supervisors manager for approval?

asked Sep 29, 2023 by johanpr (120 points)
0 votes
1 answer

Hello Adaxes Team I have recently installed the new version Adaxes 2023, which offers many new features. Unfortunately, there is no real progress with the approval process. ... foreseeable future? Or is there a workaround for this? Thanks and regards pudong

asked Feb 2, 2023 by pudong (680 points)
0 votes
1 answer

How to deal with approval requests in a AD and AAD environment? I have recently created a workflow where I log on as a AD user and request to be a member of a AAD group, ... of member works despite the initial request was based on a AD user and not a AAD user.

asked May 2, 2023 by Daniel (140 points)
0 votes
1 answer

I have have admin rights and am in the "Request Approvers" group. I have a dearth of old approval requests to delete. I saw I could not delete them until I denied them ... says I have "No approval requests." How can I delete these denied entries? Thanks, Scott

asked Feb 26, 2021 by chappyshi (90 points)
3,538 questions
3,229 answers
8,224 comments
547,747 users