Skip to main content

Microsoft Online Rule Reference

Microsoft Online uses the internal service name MSOL. Its rules inherit the standard customer-service or user-service request contract and add Microsoft-specific values under ServiceProperties.

Prerequisite

The customer's internal Azure AD service (Microsoft Entra ID integration) must be successfully provisioned before Atria can execute Microsoft Online operations for that tenant.

Rule locations

Common extension points are:

Event$Customer Service$MSOL$After Provision
Event$Customer Service$MSOL$Before Deprovision
Event$User Service$MSOL$After Provision
Event$User Service$MSOL$Before Deprovision

The entire service lifecycle is available. Use After Provision for changes that require the tenant, user, or licence operation to have completed. Use Before Deprovision when custom data must be collected or removed before the standard object is disconnected.

Base values

MSOL customer-service rules include all customer-service properties. MSOL user-service rules include all user-service properties.

Frequently used top-level values are:

Customer serviceUser service
{CustomerID}{CustomerID}
{CustomerShortName}{UserID}
{CustomerLongName}{Username}
{PrimaryDomain}{UserEmail}
{ServiceProperties}("WebServiceConnection"){ServiceProperties}("UsageLocation")
{ServiceObjectID}{UserServiceObjectID}

MSOL customer-service properties

Service propertyShapeAvailability and use
WebServiceConnectionObjectAdded by the MSOL customer provider for both provision and deprovision. Pass it only to MSOL actions that expect the connection object.
IsCustomerServiceDeprovisioningBooleanService state used to distinguish customer-service disconnection from ordinary user-service removal.

Additional values defined by the effective MSOL/Azure AD service configuration can also appear in ServiceProperties. The standard rules currently consume keys including Tenant, Agreement, Domains, IsConnecting, RemoveRelationShip, and SuspendSubscriptions in the relevant connector or service flow. Treat these as flow-specific and confirm their presence in a journalled request before using them in a custom rule.

Read the connection object in an action parameter as:

{ServiceProperties}("WebServiceConnection")

Do not render this object into a string or log it.

MSOL user-service properties

The MSOL user provider adds the following keys to ServiceProperties:

Service propertyShapeProvisionDeprovisionDescription
WebServiceConnectionObjectYesYesMSOL web-service connection object.
IsCustomerServiceDeprovisioningBooleanYesYesWhether the parent customer service is being removed.
OffersJSON stringYesYesSerialised licence/offer provisioning payload.
UserPropertiesHashtableYesYesUser Active Directory attributes copied into the service-property bag.
UsageLocationStringYesYesCountry code from the customer connector.
UserExistInRecyclingBinActionStringYesYesConfigured action for a matching recycled user.
PartnerCenterUserIdStringYesYesPartner Center user identifier, when known.
UserPrincipalNameStringYesNoTarget UPN. It can be blank during multi-user provisioning.
TempPasswordProtected valueYesNoTemporary password. Pass only to an action designed to accept it; never log it.
ConvertToSharedMailboxBooleanYesNoWhether the mailbox should be converted to shared.
RemoveEmailAliasesBooleanYesNoWhether aliases should be removed as part of the operation.
EmailAliasesToKeepString arrayYesNoAliases exempted from removal; CORE initially supplies an empty array.
RemoveDelegatedPermissionsBooleanYesNoWhether delegated permissions should be removed.
LicenseDetailsStringYesNoDisplay/diagnostic licence detail.
IsLicenseRequestedBooleanYesNoWhether a licence has been requested.
EnabledUserPlansJSON stringYesNoSerialised selected user plans.

Examples:

{ServiceProperties}("UsageLocation")
{ServiceProperties}("UserPrincipalName")
{ServiceProperties}("IsLicenseRequested")

Provision-only condition:

Not String.IsNullOrEmpty({ServiceProperties}("UserPrincipalName")) AndAlso
CBool({ServiceProperties}("IsLicenseRequested"))

Run a Microsoft 365 script

For tenant or user automation, use MSOL Run Customer Script or MSOL Run User Script instead of inserting connection commands into Powershell Execute.

The MSOL actions can connect Exchange Online, Microsoft Graph PowerShell, Partner Center, or legacy AzureAD/MSOnline modules. They always supply $RequestProperties and $CustomerId; connector-backed runs can also supply $TenantId, $UserId, $UserAzureId, or $GraphToken. Named action mappings become additional PowerShell variables.

See Run Microsoft Online scripts for the exact connection keywords, timeout units, parameter mapping, and worked examples.

Deprovision safely

When a customer MSOL service is removed, its user services can be deprovisioned as part of that larger operation. Check:

{ServiceProperties}("IsCustomerServiceDeprovisioning")

before deciding whether a user-level custom action should remove a user, only remove licences, or do nothing because tenant-level cleanup owns the operation.

Never assume provision-only values such as TempPassword or EnabledUserPlans are present during deprovision.