Update-VPASIdentityRole


Supported Environments:
SelfHosted
SharedServices
PCloudStandard


Synopsis:

UPDATE ROLE IN IDENTITY


Description:

USE THIS FUNCTION TO ADD OR REMOVE USERS FROM AN EXISTING ROLE IN IDENTITY


Syntax:

Update-VPASIdentityRole -RoleName <String> -Action <String> -ActionValue <String> [-token <Hashtable>] [<CommonParameters>]

Update-VPASIdentityRole -RoleID <String> -Action <String> -ActionValue <String> [-token <Hashtable>] [<CommonParameters>]

Update-VPASIdentityRole -InputParameters <Hashtable> [-token <Hashtable>] [<CommonParameters>]


Parameters:

-RoleName <String>
Unique RoleName in Identity to query for target RoleID

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

-RoleID <String>
Target RoleID that maps the target Role in Identity
Supply the RoleID to skip querying for the target Role

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

-Action <String>
Specify the action taken on the target Role
Possible values: AddUser, RemoveUser, AddRole, RemoveRole, EditDescription

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

-ActionValue <String>
Value that will be updated on the target Role based on selected action

Required: true
Position: named
Default value:
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:

$UpdateIdentityRole = Update-VPASIdentityRole -Name {NAME VALUE} -Action {ACTION VALUE} -User {USER Value}

$UpdateIdentityRole = Update-VPASIdentityRole -RoleID {ROLEID VALUE} -Action {ACTION VALUE} -User {USER Value}

$InputParameters = @{
        RoleName = "VmanTestRole1"
        Action = "AddUser"|"RemoveUser"|"AddRole"|"RemoveRole"|"EditDescription"
        ActionValue = "Adding a new role description"
}
$UpdateIdentityRole = Update-VPASIdentityRole -InputParameters $InputParameters

$InputParameters = @{
        RoleID = "aec52ec7-1234-abcd-efgh-5678d1fce0ae"
        Action = "AddUser"|"RemoveUser"|"AddRole"|"RemoveRole"|"EditDescription"
        ActionValue = "vman@cyberark.cloud.1234"
}
$UpdateIdentityRole = Update-VPASIdentityRole -InputParameters $InputParameters


Outputs:

$true if successful

$false if failed