Skip to main content
Skip table of contents

System List Variables: Tenant

Variable: Tenant System Variables & Lists

Automation scripts for sapio365 can use the following variables and lists. Depending on the session under which the script is executed, they return:

Initial domain name
Default domain name

Detailed Description


O365Tenant_AllDomains - List of all domains that can be used.

Loop: Each tenant is referenced by {%O365Tenant_DomainName%}

UserInput: Use the list of tenants in a drop down combo using O365Tenant_DomainName as the combo list value;

Example Script

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<ytriaAutomation Console="true" KeepAlive="True">
	<SetVar verif="Verifions que les variables fonctionnent"/>
	<echo value="V: {%verif%}"/>
	<echo value="Initial domain: {%O365Tenant_InitialDomainName%}"/>
	<echo value="Default domain: {%O365Tenant_DefaultDomainName%}"/>
	<loop list="O365Tenant_AllDomains">
		<echo value="Domain {%LoopIndex%}/{%listSIZE%}: {%O365Tenant_DomainName%}"/>
	<UserInput Title="My tenant is bigger than yours">
			<Variable name="MyDomain" Label="My Domain" Tooltip="Tenants from your organization" Type="List">
				<ListItem ListName="O365Tenant_AllDomains" value="O365Tenant_DomainName"/>
	<echo value="Selected domain: {%MyDomain%}"/>
JavaScript errors detected

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

If this problem persists, please contact our support.