def rule(event):
    if any(
        [
            any(
                [
                    "get-ADPrincipalGroupMembership" in event.deep_get("Payload", default=""),
                    "get-ADPrincipalGroupMembership" in event.deep_get("ContextInfo", default=""),
                ]
            ),
            any(
                [
                    all(
                        [
                            "get-aduser" in event.deep_get("Payload", default=""),
                            "-f " in event.deep_get("Payload", default=""),
                            "-pr " in event.deep_get("Payload", default=""),
                            "DoesNotRequirePreAuth" in event.deep_get("Payload", default=""),
                        ]
                    ),
                    all(
                        [
                            "get-aduser" in event.deep_get("ContextInfo", default=""),
                            "-f " in event.deep_get("ContextInfo", default=""),
                            "-pr " in event.deep_get("ContextInfo", default=""),
                            "DoesNotRequirePreAuth" in event.deep_get("ContextInfo", default=""),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
