Examples/05-Manage-AccessRequests.ps1

<#
    Reviews pending access requests and submits a new one. Check
    Get-SIAAccessRequestForm for the exact -RequestDetails fields your
    tenant's workflow expects for the target category you're requesting.

    Note: CyberArk's currently published schema documents only
    'CLOUD_CONSOLE' as a valid -TargetCategory value - see
    docs/LIMITATIONS.md before relying on this for a SIA infrastructure
    (VM/database) access request.
#>


Get-SIAAccessRequest | Where-Object status -eq 'Pending' | Format-Table -AutoSize

$form = Get-SIAAccessRequestForm
$form | Format-List *

$newRequest = New-SIAAccessRequest -TargetCategory 'CLOUD_CONSOLE' -RequestDetails @{
    locationType = 'Azure'
}

Write-Host "Submitted access request $($newRequest.id)"