Skip to main content
Skip table of contents

CheckSession: verify that the current session matches the permissions required for the current job

Tag: CheckSession

When an automation script uses functions that require certain privileges and rights, CheckSession allows to verify the credentials of the user session the script was launched from, and warn the user of potential access problems, or raise an error.

NB: this is only relevant in Job automation. Basic automation from XML files cannot be verified with CheckSession.

If Value is not supplied in the script, the values set in the job header are used.

Role privileges are always set in the script header, and are always verified with CheckSession.

<CheckSession Value="WarningIfAdmin" Type="ERROR"/>

Tag Attributes

AttributesAttribute Value
ValueA semi-colon-separted combination of:
TypeIf omitted or left blank (""), displays the warning message box,
If set to "Error", triggers an automation error.

Detailed Description

Upon analysis of the context (current session is active, admin, ultra admin), the job center opens a dialog to inform the user, who might cancel execution.


An RBAC session is considered an Ultra Admin.

RequiredLoginA session must be active for the job to execute


WarningIfAdminWarns about possible missing permissions if you're logged in as an admin


WarningIfUltraAdminTechAn Admin session is recommended


WarningIfAdminTechAn Ultra Admin session is recommended


Example Script

<ytriaAutomation Application="sapio365">
	<!-- logged in as admin: error -->
	<CheckSession Value="WarningIfAdmin" Type="ERROR"/>
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.