Hello,
Thank you for clarifying. In case when all users have mailboxes in Exchange Online (it is the case for remote mailboxes as well), you need to use a different approach. To achieve the desired, replace the condition for the Recipient Type Details property in the first action set with the following script:
$Context.ConditionIsMet = $Context.TargetObject.MailboxType -eq "ADM_EXCHANGE_MAILBOXTYPE_USER" -and `
$Context.TargetObject.RecipientLocation -eq "ADM_EXCHANGERECIPIENTLOCATION_OFFICE365"
In the second action set, replace the condition with the following script:
$Context.ConditionIsMet = -not($Context.TargetObject.MailboxType -eq "ADM_EXCHANGE_MAILBOXTYPE_USER" -and `
$Context.TargetObject.RecipientLocation -eq "ADM_EXCHANGERECIPIENTLOCATION_OFFICE365")