Deny-VPASIncomingRequest


Supported Environments:
SelfHosted
SharedServices
PCloudStandard


Synopsis:

DENY AN INCOMING REQUEST IN CYBERARK


Description:

USE THIS FUNCTION TO DENY AN INCOMING REQUEST IN CYBERARK


Syntax:

Deny-VPASIncomingRequest [-RequestedSafe <String>] [-RequestedPlatform <String>] [-RequestedUsername <String>] [-RequestedAddress <String>] [-RequestedReason <String>] -denyReason <String> [-WhatIf] [-HideWhatIfOutput] [-token <Hashtable>] [<CommonParameters>]

Deny-VPASIncomingRequest -RequestedAcctID <String> [-RequestedReason <String>] -denyReason <String> [-WhatIf] [-HideWhatIfOutput] [-token <Hashtable>] [<CommonParameters>]

Deny-VPASIncomingRequest -requestID <String> -denyReason <String> [-WhatIf] [-HideWhatIfOutput] [-token <Hashtable>] [<CommonParameters>]

Deny-VPASIncomingRequest -InputParameters <Hashtable> [-token <Hashtable>] [<CommonParameters>]


Parameters:

-RequestedSafe <String>
Safe name that will be used to query for the target account if no AcctID is passed

Required: false
Position: named
Default value:
Accept pipeline input: true (ByPropertyName)
Accept wildcard characters: false

-RequestedPlatform <String>
PlatformID that will be used to query for the target account if no AcctID is passed

Required: false
Position: named
Default value:
Accept pipeline input: true (ByPropertyName)
Accept wildcard characters: false

-RequestedUsername <String>
Username that will be used to query for the target account if no AcctID is passed

Required: false
Position: named
Default value:
Accept pipeline input: true (ByPropertyName)
Accept wildcard characters: false

-RequestedAddress <String>
Address that will be used to query for the target account if no AcctID is passed

Required: false
Position: named
Default value:
Accept pipeline input: true (ByPropertyName)
Accept wildcard characters: false

-RequestedAcctID <String>
Unique ID that maps to a single account, passing this variable will skip query functions to find target account

Required: true
Position: named
Default value:
Accept pipeline input: true (ByPropertyName)
Accept wildcard characters: false

-RequestedReason <String>
Reason that will be used to query and find the target account request

Required: false
Position: named
Default value:
Accept pipeline input: true (ByPropertyName)
Accept wildcard characters: false

-requestID <String>
Unique ID that maps to a single account request, passing this variable will skip any query functions

Required: true
Position: named
Default value:
Accept pipeline input: true (ByPropertyName)
Accept wildcard characters: false

-denyReason <String>
Reason for denying the incoming request, will be saved for audit purposes

Required: true
Position: named
Default value:
Accept pipeline input: true (ByPropertyName)
Accept wildcard characters: false

-WhatIf [<SwitchParameter>]
Run code simulation to see what is affected by running the command as well as any possible implications
This is a code simulation flag, meaning the command will NOT actually run

Required: false
Position: named
Default value: False
Accept pipeline input: true (ByPropertyName)
Accept wildcard characters: false

-HideWhatIfOutput [<SwitchParameter>]
Suppress any code simulation output from the console

Required: false
Position: named
Default value: False
Accept pipeline input: true (ByPropertyName)
Accept wildcard characters: false

-InputParameters <Hashtable>
HashTable of values containing the parameters required to make the API call

Required: true
Position: named
Default value:
Accept pipeline input: true (ByPropertyName)
Accept wildcard characters: false

-token <Hashtable>
HashTable of data containing various pieces of login information (PVWA, LoginToken, HeaderType, etc).
If -token is not passed, function will use last known hashtable generated by New-VPASToken

Required: false
Position: named
Default value:
Accept pipeline input: true (ByPropertyName)
Accept wildcard characters: false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug
ErrorAction, ErrorVariable, WarningAction, WarningVariable
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216)


Examples:

$DenyIncomingRequestStatus = Deny-VPASIncomingRequest -RequestedSafe {SAFE VALUE} -RequestedPlatform {PLATFORM VALUE} -RequestedUsername {USERNAME VALUE} -RequestedAddress {ADDRESS VALUE} -denyReason {REASON VALUE}

$DenyIncomingRequestStatus = Deny-VPASIncomingRequest -RequestedAcctID {ACCTID VALUE} -requestID {REQUESTID VALUE} -denyReason {REASON VALUE}

$WhatIfSimulation = Deny-VPASIncomingRequest -RequestedAcctID {ACCTID VALUE} -requestID {REQUESTID VALUE} -denyReason {REASON VALUE} -WhatIf

$InputParameters = @{
        RequestedSafe = "TargetSafe"
         RequestedPlatform = "TargetPlatform"
         RequestedUsername = "TargetUsername"
         RequestedAddress = "TargetAddress"
         RequestedReason = "Vadim request this account to test for a demo"
         denyReason = "Vman denied this request"
         WhatIf = $true|$false
         HideWhatIfOutput = $true|$false
}
$DenyIncomingRequestStatus = Deny-VPASIncomingRequest -InputParameters $InputParameters

$InputParameters = @{
        RequestedAcctID = "22_123"
         RequestedReason = "Vadim request this account to test for a demo"
         denyReason = "Vman denied this request"
         WhatIf = $true|$false
         HideWhatIfOutput = $true|$false
}
$DenyIncomingRequestStatus = Deny-VPASIncomingRequest -InputParameters $InputParameters

$InputParameters = @{
        requestID = "123_4"
         denyReason = "Vman denied this request"
         WhatIf = $true|$false
         HideWhatIfOutput = $true|$false
}
$DenyIncomingRequestStatus = Deny-VPASIncomingRequest -InputParameters $InputParameters


Outputs:

$true if successful

$false if failed