Public/Targets/Get-SIAMFAKey.ps1
|
function Get-SIAMFAKey { <# .SYNOPSIS Retrieves the caller's SIA SSH MFA key. .DESCRIPTION Retrieves the MFA key used for SSH single sign-on. The calling service account or user must hold the JitUser role. .EXAMPLE Get-SIAMFAKey Retrieves the current session's SSH MFA key. .INPUTS None. .OUTPUTS psSIA.MFAKey .LINK https://api-docs.cyberark.com/secure-infra-access/docs/sia-mfa-key-api #> [CmdletBinding()] [OutputType('psSIA.MFAKey')] param() Invoke-SIARequest -Method GET -Path '/api/ssh/sso/key' | ConvertFrom-SIAResponse -TypeName 'psSIA.MFAKey' } |