Public/Access/Get-SCAEligibleGroup.ps1
|
function Get-SCAEligibleGroup { <# .SYNOPSIS Lists cloud groups the caller is eligible to request just-in-time membership in. .DESCRIPTION Calls the Secure Cloud Access Access API (GET /access/{csp}/eligibility/groups) to list the provider groups (for example an Azure Entra ID group or an AWS IAM Identity Center group) the authenticated identity can request time-bound membership in. .PARAMETER Provider The cloud service provider to query: AWS, Azure, or GCP. .PARAMETER Session A psSCA.Session object or session name. Defaults to the current default session. .EXAMPLE Get-SCAEligibleGroup -Provider Azure Lists Azure groups the current identity is eligible to request JIT membership in. .INPUTS None. .OUTPUTS psSCA.EligibleGroup .LINK https://api-docs.cyberark.com/sca-api/docs/secure-cloud-access-apis #> [CmdletBinding()] [OutputType('psSCA.EligibleGroup')] param( [Parameter(Mandatory)] [ValidateSet('AWS', 'Azure', 'GCP')] [string]$Provider, [Parameter()] [object]$Session ) $csp = $Provider.ToLowerInvariant() Invoke-SCARequest -Session $Session -Service 'SCA' -Method GET -Path '/access/{csp}/eligibility/groups' ` -PathParameters @{ csp = $csp } -Operation 'Get-SCAEligibleGroup' -TypeName 'psSCA.EligibleGroup' } |