Public/Roles/Get-IDRoleMember.ps1
|
function Get-IDRoleMember { [CmdletBinding()] param ( [Parameter(Mandatory = $true, ValueFromPipelinebyPropertyName = $true)] [Alias('Uuid')] $Name ) BEGIN {} #begin PROCESS { #Constructed body for the rest call $body = [ordered]@{ "Name" = $Name } #Constructed parameters for the rest call $RestCall = @{ "URI" = "https://$($ISPSSSession.TenantId).id.cyberark.cloud/Roles/GetRoleMembers" "Headers" = $($ISPSSSession.WebSession.Headers) "Method" = "Post" "Body" = ($body | ConvertTo-Json -Depth 6) "ContentType" = "application/json" } # invoking the rest call $result = Invoke-IDRestMethod @RestCall return $result.results.row } #process END {} #end } |