Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit AllowSessionRequest attribute #522

Open
vctrala opened this issue Apr 19, 2024 · 1 comment
Open

Edit AllowSessionRequest attribute #522

vctrala opened this issue Apr 19, 2024 · 1 comment

Comments

@vctrala
Copy link

vctrala commented Apr 19, 2024

How to edit AllowSessionRequest attribute via PS?

I can edit other attributes but not AllowSessionRequest.

PS1

@JeffHarkavy
Copy link
Contributor

@vctrala Thank you for contacting us.

Only a small number of attributes are directly editable with command parameters. To edit other attributes you need to pass an Account Object containing the desired edits to the Edit-SafeguardAssetAccount:

PS  C:\ > $account = Find-SafeguardAssetAccount -QueryFilter "Name eq 'devProvdChk234'"
PS  C:\ > $account|Format-Table Id,Name,RequestProperties

Id Name           RequestProperties
-- ----           -----------------
 3 devProvdChk234 @{AllowPasswordRequest=True; AllowSessionRequest=False; AllowSshKeyRequest=False; AllowApiKeyRequest=False; AllowFileRequest=False}

PS  C:\ > $account.RequestProperties.AllowSessionRequest = $true
PS  C:\ > Edit-SafeguardAssetAccount -AccountObject $account

Id                           : 3
Name                         : devProvdChk234
[...]
RequestProperties            : @{AllowPasswordRequest=False; AllowSessionRequest =True; AllowSshKeyRequest=False; 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants