We use cookies to improve your experience.
By your continued use of this site you accept such use.
For more details please see our privacy policy and cookies policy.

Script repository

Check whether Microsoft 365 user account is blocked

April 28, 2020 Views: 2213

The script can be used in Business Rules, Custom Commands and Scheduled Tasks to check whether a user is blocked from signing in to Microsoft 365 (Office 365). To use it with Adaxes, add the script to your rule, command or task using the If PowerShell script returns true condition.

Edit Remove
$Context.ConditionIsMet = $False

    $signInBlocked = $Context.TargetObject.Get("adm-O365AccountBlocked")
    return # The user doesn't have a Microsoft 365 account

$Context.ConditionIsMet = !($signInBlocked)
Comments 0
Leave a comment

Got questions?

Support Questions & Answers