def rule(event):
    if all(
        [
            event.deep_get("ResourceDisplayName", default="") == "Device Registration Service",
            event.deep_get("conditionalAccessStatus", default="") == "success",
            not event.deep_get("AuthenticationRequirement", default="")
            == "multiFactorAuthentication",
        ]
    ):
        return True
    return False
