- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.
01-15-2024 07:16 AM
Hi,
I'm trying to play with the OPAG tool to see if I can create authorization tokens before I get a request.
According to the documentation, "the Offline Policy Authorization Generator tool allows administrators to proactively generate authorization codes for endpoint users, without waiting for requests from them. These codes are generated by running the tool in CLI mode."
I can't find any documentation about how to do it.
Could not find any parameters to run it from CMD either.
Has anyone had an experience with the tool?
01-15-2024 09:52 AM
@Vladislav Kostyuk If you want to run the tool in CLI mode, just go ahead and run the tool with the -help parameter and see what options you want to use. Select this answer as Best Answer if this helped you out.
C:\Shared\Cyberark\EPM>epm_opag_tool.exe -help
C:\Shared\Cyberark\EPM>
USAGE:
VF_ONE_TIME_AUTH.EXE -command genToken
(-targetUser user_name | -targetUserSid user_sid)
[-fileHash file_hash] [-timeLimit tm_limit_hours]
-action (elevate|run) -inheritAction (yes|no)
-certificate cert_name
-command Must be first parameter. The command to perform.
genToken - Generate Authorization Token.
-targetUser User name in format Domain\User. In the command line you
must include either the -targetUser or the -targetUserSid
parameter, but not both.
-targetUserSid User SID. In the command line you must include either
the -targetUserSid' parameter, but not both.
-fileHash File/application SHA1 checksum. This parameter is optional. If
the parameter is not included, the user can launch any
application.
-timeLimit The Time limitation, in hours, for the token. The limit starts
from the time when the administrator generates the Token.
This parameter is optional. If the parameter is not included,
the Token is active for 14 days, which is the maximum limit.
-action Action flag. Value with 'elevate' or 'run'.
-inheritAction Apply action to child processes. Value with 'yes' or 'no'.
Default is 'no'.
-certificate The 'Issued To' field of a user certificate installed on the
machine that runs the tool.
-----------------------------
Sample:
EPM_OPAG_tool.EXE -command genToken -targetUser DOM\john
-fileHash 687EFCE8FA372A64B8292AA5293D6128C0D796BB
-timeLimit 5 -action run -inheritAction no
-certificate my_cert1
01-15-2024 09:52 AM
@Vladislav Kostyuk If you want to run the tool in CLI mode, just go ahead and run the tool with the -help parameter and see what options you want to use. Select this answer as Best Answer if this helped you out.
C:\Shared\Cyberark\EPM>epm_opag_tool.exe -help
C:\Shared\Cyberark\EPM>
USAGE:
VF_ONE_TIME_AUTH.EXE -command genToken
(-targetUser user_name | -targetUserSid user_sid)
[-fileHash file_hash] [-timeLimit tm_limit_hours]
-action (elevate|run) -inheritAction (yes|no)
-certificate cert_name
-command Must be first parameter. The command to perform.
genToken - Generate Authorization Token.
-targetUser User name in format Domain\User. In the command line you
must include either the -targetUser or the -targetUserSid
parameter, but not both.
-targetUserSid User SID. In the command line you must include either
the -targetUserSid' parameter, but not both.
-fileHash File/application SHA1 checksum. This parameter is optional. If
the parameter is not included, the user can launch any
application.
-timeLimit The Time limitation, in hours, for the token. The limit starts
from the time when the administrator generates the Token.
This parameter is optional. If the parameter is not included,
the Token is active for 14 days, which is the maximum limit.
-action Action flag. Value with 'elevate' or 'run'.
-inheritAction Apply action to child processes. Value with 'yes' or 'no'.
Default is 'no'.
-certificate The 'Issued To' field of a user certificate installed on the
machine that runs the tool.
-----------------------------
Sample:
EPM_OPAG_tool.EXE -command genToken -targetUser DOM\john
-fileHash 687EFCE8FA372A64B8292AA5293D6128C0D796BB
-timeLimit 5 -action run -inheritAction no
-certificate my_cert1
01-15-2024 09:52 AM
@Vladislav Kostyuk If you want to run the tool in CLI mode, just go ahead and run the tool with the -help parameter and see what options you want to use. Select this answer as Best Answer if this helped you out.
C:\Shared\Cyberark\EPM>epm_opag_tool.exe -help
C:\Shared\Cyberark\EPM>
USAGE:
VF_ONE_TIME_AUTH.EXE -command genToken
(-targetUser user_name | -targetUserSid user_sid)
[-fileHash file_hash] [-timeLimit tm_limit_hours]
-action (elevate|run) -inheritAction (yes|no)
-certificate cert_name
-command Must be first parameter. The command to perform.
genToken - Generate Authorization Token.
-targetUser User name in format Domain\User. In the command line you
must include either the -targetUser or the -targetUserSid
parameter, but not both.
-targetUserSid User SID. In the command line you must include either
the -targetUserSid' parameter, but not both.
-fileHash File/application SHA1 checksum. This parameter is optional. If
the parameter is not included, the user can launch any
application.
-timeLimit The Time limitation, in hours, for the token. The limit starts
from the time when the administrator generates the Token.
This parameter is optional. If the parameter is not included,
the Token is active for 14 days, which is the maximum limit.
-action Action flag. Value with 'elevate' or 'run'.
-inheritAction Apply action to child processes. Value with 'yes' or 'no'.
Default is 'no'.
-certificate The 'Issued To' field of a user certificate installed on the
machine that runs the tool.
-----------------------------
Sample:
EPM_OPAG_tool.EXE -command genToken -targetUser DOM\john
-fileHash 687EFCE8FA372A64B8292AA5293D6128C0D796BB
-timeLimit 5 -action run -inheritAction no
-certificate my_cert1
01-21-2024 07:04 AM
Hi @Leo Magallon,
One more question, do you know if there is an option in CLI to create a one time elevation token?
I see the option for one time elevation in the GUI version but can't trigger it with the timeLimit parameter in CLI.
Thanks!
01-23-2024 12:15 PM
I don't see an option for a one-time elevation token. The timeLimit wants you provide a value in terms of positive numbers. I actually do not know if zero is an option.
01-23-2024 12:15 PM
I don't see an option for a one-time elevation token. The timeLimit wants you provide a value in terms of positive numbers. I actually do not know if zero is an option.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!

