How to replicate the prompt for Privilege Password functionality within the NCM API
All supported NCM versions
In the NCM User Interface, this functionality is achieved by selecting "Use User Credentials" and "Prompt for Privilege Password" within the Credentials Configuration screen (located in Global System Administration).
To replicate this via the API and pass the necessary information to create a configlet push job, you must use the scheduleJobWithCustomCredentials method.
ResourceIdentityInfo scheduleJobWithCustomCredentials(
JobInfo jobInfo,
java.lang.String userName,
java.lang.String password,
java.lang.String privilegedPassword
) throws
InvalidDataException,
LicensingException,
AccessDeniedException,
ApiBusinessException,
ApiSystemException,
java.rmi.RemoteException
The ability to provide credentials when scheduling a job is determined by system administration settings. The administrator dictates the mode of operation, which in turn controls how the scheduleJobWithCustomCredentials method behaves:
SHARED_MODE: The system assumes that credentials are automatically configured on the target device. In this mode, the system will ignore any custom credentials provided via the API method.
USER_LOGIN_MODE: The system assumes the credentials of the currently logged-in user will be used. If the "privileged password" option is enabled in NCM, the system expects the privilegedPassword parameter in this API function to be populated.
PROMPT_USER_MODE: The system assumes the user will always provide custom credentials when scheduling a job. In the UI, this triggers a prompt. When using the API, both the standard credentials and the privileged password must be supplied via this function.
jobInfo: The object containing the details of the job being scheduled.
userName: The username for device access.
password: The standard password for device access.
privilegedPassword: The enable/privileged execution password required for the specific job.
If the call fails or encounters an error, it may throw one of the following exceptions:
InvalidDataException
AccessDeniedException
LicensingException
ApiBusinessException
ApiSystemException
java.rmi.RemoteException